From 170a15299c8eef0233a498ae8ec74a9e5d55ce77 Mon Sep 17 00:00:00 2001 From: tobiasrausch Date: Mon, 11 Apr 2022 10:44:57 +0200 Subject: [PATCH] excl secondary matches --- src/bam2match.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bam2match.h b/src/bam2match.h index 862e578..ef9c80b 100644 --- a/src/bam2match.h +++ b/src/bam2match.h @@ -70,7 +70,7 @@ namespace bamstats faidx_t* fai = fai_load(c.genome.string().c_str()); bam1_t* rec = bam_init1(); while (sam_read1(samfile, hdr, rec) >= 0) { - if (rec->core.flag & (BAM_FQCFAIL | BAM_FDUP | BAM_FUNMAP)) continue; + if (rec->core.flag & (BAM_FQCFAIL | BAM_FDUP | BAM_FUNMAP | BAM_FSECONDARY)) continue; if ((rec->core.qual < c.minMapQual) || (rec->core.tid<0)) continue; // New chromosome?