This is a test version of Biostars. For the public version, visit https://www.biostars.org.
MACS2 reads report inconsistent with samtools flagstat

Hi there,

I have read here and here.

But, I am still confused.

My IP bam flagstat:

18880801 + 0 in total (QC-passed reads + QC-failed reads)
253218 + 0 duplicates
14130154 + 0 mapped (74.84%:-nan%)
0 + 0 paired in sequencing
0 + 0 read1
0 + 0 read2
0 + 0 properly paired (-nan%:-nan%)
0 + 0 with itself and mate mapped
0 + 0 singletons (-nan%:-nan%)
0 + 0 with mate mapped to a different chr
0 + 0 with mate mapped to a different chr (mapQ>=5)

MACS2 report:

# tag size is determined as 36 bps
# total tags in treatment: 8308438
# tags after filtering in treatment: 8005485
# maximum duplicate tags at the same position in treatment = 1
# Redundant rate in treatment: 0.04

So, after remove duplicates:

14130154 (mapped) - 253218(duplicates) = 13876936.

This number is still much bigger than 8308438.

So, why is that? and why MACS2 further filter down to 8005485?

Thanks,
Ming

chip-seq macs2

It might be that macs2 removes reads with mapq below a certain threshold and other uncertain reads. Try to run samtools view -c -F3844 -q 5 myaln.bam and see if you get a number closer to macs'. -F3844 filters out:

  • read unmapped
  • not primary alignment
  • read fails platform/vendor quality checks
  • read is PCR or optical duplicate
  • supplementary alignment

I run that command, and it gives me 14,130,154

Still much bigger than the 8 million reads MACS2 retains.

0 answers

No answers yet.

Log in to answer this question.