Running IGV with a batch file

As of version 1.5, a user can load a text file to execute a series of sequential tasks by using Tools>Run Batch Script. The user loads a TXT file that contains a list of commands, one per line, that will be run by IGV. Arguments are delimited by spaces (NOTE: not tabs). Lines beginning with # or // are are skipped. See https://github.com/igvteam/igv/wiki/Batch-commands for a complete list of batch commands..

Example

new
genome hg18
load  myfile.bam
snapshotDirectory mySnapshotDirectory
goto chr1:65,289,335-65,309,335
sort position
collapse
snapshot
goto chr1:113,144,120-113,164,120
sort base
collapse
snapshot
goto chr4:68,457,006-68,467,006
sort strand
collapse
snapshot

The example script does the following:

  1. Loads a file.
  2. Sets the genome and snapshot directory.
  3. Jumps to a specified locus.
  4. Sorts, collapses, and then takes a snapshot of the screen.
  5. Repeats these steps for other loci.