python interface to IGV that simplifies creating screenshots of BAMs, VCFs, BEDs, etc for one-off spot checking or automated / scripted image collection
Python interface to IGV - inspired by an IGV_plotter tool originally written by @tmfromer.
It includes the following executables:
igvLaunches IGV from the command line and optionally makes it load some file(s) and jump to some locus.
igv_plotterAutomates taking IGV screenshots of one or more data files at one or more loci.
igvweb_viewerAllows bam, vcf, and/or bed file tracks to be viewed in a web browser using igv.js.
- To install for all users, run:
pip install igv_plotter
- To install in your home directory (eg. if you don’t have permissions to install for all users), add ~/.local/bin to your PATH and run:
pip install igv_plotter --user
To see all command line options, you can do:
igvweb_viewer script - usage example:
This starts a webserver for viewing 3 files at 2 loci:
igvweb_viewer my_file1.vcf my_file2.bam my_file3.bed 1:12345 chrX:12345
After starting this script, open your web browser to 127.0.0.1:8000 for an interactive browser-based IGV view of these files.
igv_plotter script - usage example:
This loads 3 files, and takes 2 snapshots:
igv_plotter my_file1.vcf my_file2.bam my_file3.bed 1:12345 chrX:12345
igv script - usage example:
This launches IGV with 2 files loaded at locus 1:12345:
igv my_file1.vcf my_file3.bed 1:12345
~/.igv_plotter config file can be created and used to persitantly set any
igv command line options, by using lines like:
<command line option (without --)> = <value>