Hi all,
I know this question has been asked many times. But, I am still not able to find the proper answer. So, how do you caluclate the number of uniquely mapped reads from BAM file generated by BWA?
So far, I have tried the folowing:
I am totally confused now? Does the 3rd line of flagstat o/p gives the no. of uniqely mapped reads ? or the SAM flag -F 256 gives ? or the other one?
Appreciate any help.
Thanks
I know this question has been asked many times. But, I am still not able to find the proper answer. So, how do you caluclate the number of uniquely mapped reads from BAM file generated by BWA?
So far, I have tried the folowing:
Code:
samtools flagstat LPCWLN_fsorted.bam 118956972 + 0 in total (QC-passed reads + QC-failed reads) 0 + 0 duplicates 117768703 + 0 mapped (99.00%:-nan%) 118956972 + 0 paired in sequencing 59478678 + 0 read1 59478294 + 0 read2 116464167 + 0 properly paired (97.90%:-nan%) 117419717 + 0 with itself and mate mapped 348986 + 0 singletons (0.29%:-nan%) 834518 + 0 with mate mapped to a different chr 755636 + 0 with mate mapped to a different chr (mapQ>=5) samtools view LPCWLN_fsorted.bam | wc -l 118956972 samtools view -F 256 LPCWLN_fsorted.bam | wc -l 118956972 samtools view LPCWLN_fsorted.bam | grep XT:A:U | wc -l 105334435
Appreciate any help.
Thanks
Comment