How To Get Mapping Statistics On Bam File
1
10
Entering edit mode
11.6 years ago
komal.rathi ★ 4.1k

I have a .BAM file that I have sorted using SAMTools sort command. Now I have to calculate the mapping statistics. I need to know how many total reads are in the BAM file (both mates) and what percentage of the reads are mapped singletons. What command should I use?

samtools • 39k views
ADD COMMENT
2
Entering edit mode

This should help samtools flagstat test.bam

ADD REPLY
1
Entering edit mode

I am closing this question because a quick google search ("bam statistics") reveals several good options. If other admins disagree feel free to reopen.

ADD REPLY
3
Entering edit mode

Really? A simple google search returns nothing for me.

ADD REPLY
0
Entering edit mode

amusing how the past comes back to bite ...

ADD REPLY
15
Entering edit mode
11.6 years ago

Putting it here to have the question answered, originally posted by Varun Gupta

samtools flagstat test.bam

And as Zev.Kronenberg indicates search for the same terms on the search form on the main page of this site you will find many hits.

ADD COMMENT
2
Entering edit mode

I suggest you use command line and some ready made programs for carrying out the statistics of your .bam files. I used BAMstat.py for getting the cross verification of the output generated using the command line.

ADD REPLY
0
Entering edit mode

Dumb question but i am dying to know how to tag names?

ADD REPLY
0
Entering edit mode

I think Istvan just used this:

[Zev.Kronenberg](Zev.Kronenberg)

which creates this: Zev.Kronenberg

ADD REPLY
1
Entering edit mode

no all you need is to just paste the url into the post

Zev.Kronenberg

it recognizes the url and generates the right link. The same works with posts.

Your approach is also correct but takes more work.

ADD REPLY

Login before adding your answer.

Traffic: 2518 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