How can I visualize the output of BAM metrics files generated by samtools stats?
1
0
Entering edit mode
2.1 years ago
Jimmy ▴ 30

I have a few dozen BAM files and I used samtools stats to generate .txt files containing the outputted BAM metrics for each of my BAMs. I would now like to visualize this output to better understand it, but I'm not sure how to do this.

The samtools stats page in htslib (http://www.htslib.org/doc/samtools-stats.html) says I can visualize the output with plot-bamstats, but I'm finding no information on how to use plot-bamstats. I tried the syntax plot-bamstats my_BAM.txt, but it said I was missing a -p flag which I do not know how to use.

How can I visualize the output with plot-bamstats or some other method?

bam visualization samtools • 3.4k views
ADD COMMENT
1
Entering edit mode
2.1 years ago
GenoMax 148k

dariober has answered that here: https://stackoverflow.com/questions/54908223/plot-bamtools-where-are-the-commands

samtools stats sortedbamfilename.bam > sortedbamfilename.stats
plot-bamstats -p my_output sortedbamfilename.stats

gnuplot package is required for this to work.

ADD COMMENT
0
Entering edit mode

Thanks -- I also had to install Libjpeg Turbo (conda install -c conda-forge libjpeg-turbo) to make this work.

ADD REPLY

Login before adding your answer.

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