Question: Do I need to remove unmapped reads before running MACS2?
0
gravatar for bxia
3.5 years ago by
bxia140
bxia140 wrote:

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.1k views
ADD COMMENTlink modified 3.5 years ago by Ming Tang2.5k • written 3.5 years ago by bxia140
2
gravatar for ablanchetcohen
3.5 years ago by
ablanchetcohen1.2k
Canada
ablanchetcohen1.2k wrote:

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 COMMENTlink modified 3.5 years ago • written 3.5 years ago by ablanchetcohen1.2k
1
gravatar for Ming Tang
3.5 years ago by
Ming Tang2.5k
Houston/MD Anderson Cancer Center
Ming Tang2.5k wrote:

MACS2 will remove the duplicated reads before calling peaks.

ADD COMMENTlink written 3.5 years ago by Ming Tang2.5k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1983 users visited in the last hour