Do I need to remove unmapped reads before running MACS2?
2
0
Entering edit mode
7.9 years ago
bxia ▴ 180

I tried to use samtools view -S -F 4 file.sam > mapped.sam to remove the unmapped reads,

But after that, I can't use

samtools view -S -F 0x40 mapped.sam | cut -f1 | sort | uniq | wc -l

to count the mapped read, it said 'missing header',

Anyone know the reason?

Thanks

ChIP-Seq • 1.9k views
ADD COMMENT
2
Entering edit mode
7.9 years ago
ablanchetcohen ★ 1.2k

You lost the header when you executed the first samtools command. Just add the parameter -h if you want to keep the header for downstream analyses.

samtools view -h -S -F 4 file.sam > mapped.sam

As for the question in the title of the post, the answer is no.

ADD COMMENT
1
Entering edit mode
7.9 years ago
Ming Tommy Tang ★ 3.9k

MACS2 will remove the duplicated reads before calling peaks.

ADD COMMENT

Login before adding your answer.

Traffic: 1819 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6