I am looking for essentially the functionality mentioned here; I want to automatically create snapshots of images of reads within a BAM file at specified loci. I know that IGV can do this, but in my experience the results from scripting IGV for this are lackluster since there can be a lot of variability as far as the number of reads on screen and resolution needed for each variant. I also saw that samtools tview has the same functionality. The answers in that previous question are a bit old now, I was hoping that something new might be available? Maybe a Bioconductor package? My searches so far have not found anything quite like this. My immediate needs are for snapshots / static plots of the reads, but ultimately I think this would be a nice application for something like Plotly to enable interactive browsing as well.
2 answers
I've written a BAM2SVG: https://github.com/lindenb/jvarkit/wiki/Bam2SVG
and a BAM2raster: https://github.com/lindenb/jvarkit/wiki/Bam2Raster
If this ist still of interest you can Check Out
https://github.com/StephanHolgerD/DrukBam
DrukBam is a program for plotting alignment files (.bam) for command line aficionados. It can be used with or without a reference fasta file and allows fast plotting multiple variants or regions of interest.
Log in to answer this question.
there is script for this here: https://github.com/stevekm/IGV-snapshot-automator
worth noting that these days my preferred solution for this is https://github.com/igvteam/igv-reports