How to get information (Count) of Unique Mapped Reads to the Genome?
0
0
Entering edit mode
2.2 years ago
ramshahaya ▴ 10

Hi,

I would like to check how many reads are uniquely aligned or mapped to the Genome (or Chromosomes)? I had aligned my data using the BWA aligner.

Would be grateful If I could get suggestions regarding this query.

I know that there is a command to check information about multi-mapped reads. If I am not mistaken.

samtools view -c fixed.bam

Thank you so much in advance.

samtools BWA • 1.0k views
ADD COMMENT
0
Entering edit mode

samtools flagstats

ADD REPLY
0
Entering edit mode

samtools flagstats fixed_Sort_Coordinate.bam

9307234 + 0 in total (QC-passed reads + QC-failed reads)

9256458 + 0 primary

50776 + 0 secondary

0 + 0 supplementary

0 + 0 duplicates

0 + 0 primary duplicates

9255274 + 0 mapped (99.44% : N/A)

9204498 + 0 primary mapped (99.44% : N/A)

9256458 + 0 paired in sequencing

4628229 + 0 read1

4628229 + 0 read2

9056900 + 0 properly paired (97.84% : N/A)

9164336 + 0 with itself and mate mapped

40162 + 0 singletons (0.43% : N/A)

79236 + 0 with mate mapped to a different chr

46085 + 0 with mate mapped to a different chr (mapQ>=5)

Thank you so much for the reply. Which row should I consider in the above results?

Is it possible to check how many uniquely mapped read on different chromosome? samtools idxstats will work? I know, samtools idxstats will provide information about mapped reads on the chromosome. If I am not mistaken. But I would like to see uniquely mapped read on a different chromosomes.

Thank you so much in advance.

ADD REPLY
0
Entering edit mode

Isn't it simply like that: unique = mapped - secondary?

Edit: Sorry, just consulted the documentation. Primary mapped should be a unique count.

primary mapped: 0x4, 0x100 and 0x800 bits not set

So the read is mapped (4 not set), and no secondary or other mapping exist and assuming BWA only gives a single alignment per read.

ADD REPLY
0
Entering edit mode

Thanks a lot

ADD REPLY

Login before adding your answer.

Traffic: 1622 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6