Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
ignore supplemental alignments
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Abbott committed Jul 7, 2014
1 parent ba9054f commit 771ed2d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/io/AlignmentFilter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@

#include <bam.h>

#ifndef BAM_FSUPPLEMENTAL
# define BAM_FSUPPLEMENTAL 2048
#endif

struct AlignmentFilter {
struct True {
bool operator()(bam1_t const* aln) const {
Expand All @@ -19,7 +23,7 @@ struct AlignmentFilter {

struct IsPrimary {
bool operator()(bam1_t const* aln) const {
return !(aln->core.flag & BAM_FSECONDARY);
return !(aln->core.flag & (BAM_FSECONDARY| BAM_FSUPPLEMENTAL));
}
};

Expand Down

0 comments on commit 771ed2d

Please sign in to comment.