From: Henrikki A. <hen...@he...> - 2010-02-26 18:56:33
|
Pratap, Abhishek wrote: > Hi All > > Sorry to push this out again. I am really looking to get few facts > straight about how to count stuff in bam file. I am not able to > address the following questions. > > 1. How do we know the #uniquely mapped reads in a bam file ? Will the > following do the trick after subtracting from the total mapped reads > ? samtools view -f 100 s_7_combined_sorted.bam | wc –l I use following 'samtools view -F 0x0004 <file>' as that filters out the non matching ones. > 2. total #reads that mapped irrespective of whether they were paired > or not ? That's the line number of the read entries. So for example with regular sam file 'cat <file> | egrep -v '^@' | wc -l' would count them. > 3. 33501178 with itself and mate mapped : this comes from the > samtools flagstat command but I dont get the meaning of "with itself > " -- Henrikki Almusa |