Hi, Does anyone know how can I draw programmatically a region of a bam alignment to a png image? I want to do this to examine several bam alignments at a time.
Because this sounds a lot like what a genome browser does (IGV, USCS, etc) could you define what your png should look like that differs from a genome browser screen shot?
You can do this using Gviz R package.
you could control IGV over a port: https://www.broadinstitute.org/igv/PortCommands
I wrote a tool to convert a BAM to SVG: https://github.com/lindenb/jvarkit/wiki/Bam2SVG
see also: https://www.biostars.org/p/158629/
Recently posted (hence my late answer): https://github.com/stevekm/IGV-snapshot-automator
Login before adding your answer.