This is a test version of Biostars. For the public version, visit https://www.biostars.org.
NGS alignment image drawing

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.

Thanks

bam ngs

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?

Hi,

You can do this using Gviz R package.

2 answers

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: Alignment plot of a small extract (sequence) from a .bam file

Recently posted (hence my late answer): https://github.com/stevekm/IGV-snapshot-automator

Log in to answer this question.