Question: Aligned read loss after SAM to BAM conversion?
0
gravatar for saddamhusain77
29 days ago by
saddamhusain770 wrote:

Hello there, I have aligned the sequenced reads with Bowtie aligner. After that I converted SAM output to BAM but when I checked the number of reads that were in BAM file I found a huge discrepancy in number of reads in SAM and BAM file. Is it normal to have reduced number of reads in BAM due to compression?

saddams-MBP:alfred saddamhusain$ wc MCM7_input2.sam
 41296062 558393216 7870675429 MCM7_input2.sam

saddams-MBP:alfred saddamhusain$ samtools view -Sbq 20 MCM7_input2.sam > MCM7_input2.bam
saddams-MBP:alfred saddamhusain$ wc MCM7_input2.bam
 6645739 49529627 1542136565 MCM7_input2.bam

saddams-MBP:alfred saddamhusain$ samtools view -Sb MCM7_input2.sam > MCM7_input2_without_q.bam
saddams-MBP:alfred saddamhusain$ wc MCM7_input2_without_q.bam
 7597383 57680530 1925767048 MCM7_input2_without_q.bam

chip-seq alignment samtools • 132 views
ADD COMMENTlink modified 29 days ago by swbarnes28.8k • written 29 days ago by saddamhusain770
1
gravatar for swbarnes2
29 days ago by
swbarnes28.8k
United States
swbarnes28.8k wrote:

Don't measure bam files with wc. They are compressed. Use samtools flagstat.

Posting that username on a public board is certainly a ...choice.

ADD COMMENTlink written 29 days ago by swbarnes28.8k

Thanks @swbarnes2, I get it. I am sorry but I don't get what you mean by "Posting that username on a public board is certainly a ...choice"

ADD REPLYlink written 29 days ago by saddamhusain770

Is your real name Saddam Husain? If not, you might better off choosing a different username as Saddam Hussein of Iraq is a pretty controversial person.

ADD REPLYlink modified 29 days ago • written 29 days ago by RamRS30k

@RamRS, not exactly as last name contains double 'S'. I hope it wouldn't have affected Biostars name policy if there is one, nor my ability to put or being answered to a question.

ADD REPLYlink written 29 days ago by saddamhusain770
1

Don't worry about it - it's not a big deal.

ADD REPLYlink written 29 days ago by RamRS30k
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: 2090 users visited in the last hour