Do I need to remove unmapped reads before running MACS2?
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
• 2,462 views
•
link
2 answers
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.
• 0 views
•
link
MACS2 will remove the duplicated reads before calling peaks.
• 0 views
•
link
Log in to answer this question.