This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to generate alignment report from bam files

I am relatively new to the programs that analyze bam files. I am wondering if there is a program that allows us to have an alignment report of all the reads of a particular nucleotide from the bam file?

For example:

chr1:2876597

Total read: 130
A: 120
T: 0
G: 8
C: 0
N: 0
Del: 2
Ins: 0

I have over 200 bam files and I would like to have a report like above for all of them. Could anyone help? Thanks!

alignment bam

If you decide a visual representation would be helpful, you can also use IGV; there is an automator script here that might make the task easier.

2 answers

I've written : FindAllCoverageAtPosition http://lindenb.github.io/jvarkit/FindAllCoverageAtPosition.html

it reports the coverage+bases (not shown in the html doc)+cigar-operators at a given position for a set of files:

$ find ./  -type f -name "*.bam" |\
   java -jar dist/findallcoverageatposition.jar -p "chr2:1234"

That's essentially what samtools mpileup is doing, though I certainly hope you're not planning to actually write that out to a file.

Log in to answer this question.