Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: The URL in the code block in the Examples section was outdated, so that's now been updated.

An IGB script file is a simple batch file that allows a user to run sequential commands outside of IGB, either at startup (via a command-line option) or during the run (via a URL "Bookmark" option -- see control bookmark). It can also be loaded via the File->Load menu (or via drag-and-drop) if its filename extension is ".igb".

Table of Contents

Introduction

You can control IGB from scripts, which are text files containing simple commands for navigation, loading data, and making snapshots.

To run an IGB script:

  • Open a script file using File > Open. Script files should end with .igb.
  • Click an IGB script link. See: Controlling IGB using IGB Links
  • Drag and drop a script file into an open IGB window.

Syntax

The script file has a simple, space-delimited syntax.

Options

"genome <version>"

...

Each command should occupy a separate line.

Commands

Bring IGB to front

Code Block
bringToFront

Bring the IGB window to the front of the user's desktop.

...


Open a genome version

Code Block
genome <version>

Open genome version (e.g., H_sapiens_Mar_2006). Any genome version or synonym that's accepted by IGB is accepted here.

...


Go back to the IGB start screen.

Code Block
homescreen

Return to the IGB start screen.

...


Go to a region

Code Block

...

goto <region>

...


Go to a region of a chromosome (e.g., "chr1:40000-60000" or "chr1:40,000-60,000"). Commas are optional. Any region format

...

accepted by the IGB

...

"load <file or URL>"quick search text entry (top left corner) is acceptable.

...

Hide a track

Code Block
hidetrack <file or URL>

Hide the track. Accepts one or more comma separated files identified by full path or URL.

Add a new data set to IGB's list of active data sets

Code Block
load <file or URL>

Load the specified file (identified by full path) or URL into IGB. The data set will appear in the user's Data Management table upon completion.

...

"loadmode

Remove a data set from IGB's list of active data sets

Code Block
unload <file or URL>

Change the load mode for an active (opened) data set

Code Block
loadmode <NO_LOAD

...

 | REGION_IN_VIEW | CHROMOSOME | GENOME> <file or URL>

Change the load mode for the specified

...

data set or file, identified by full path

...

"refresh"

...

.

Info

The loadmode command will work for any loaded track. Make sure to load your desired track before calling the loadmode command.

Load data from currently active data sets

Code Block
refresh

This is equivalent to clicking the Load Data button in IGB. This

...

Wiki Markup
"snapshot \[<filename>\]" or "snapshotwholeFrame \[<filename>\]"

Wiki Markup
"snapshotmainView \[<filename>\]"

Wiki Markup
"snapshotmainViewWithLabels \[<filename>\]"

Wiki Markup"snapshotslicedViewWithLabels \[<filename>\]"triggers loading of data from the active data sets available in IGB, as specified in the load command.

Make images

Code Block
snapshot <filename>
Code Block
snapshotwholeFrame <filename>
Code Block
snapshotmainView <filename>
Code Block
snapshotmainViewWithLabels <filename>
Code Block
snapshotslicedViewWithLabels <absolue path to file>

Export the entire frame, main view, main view with labels, or sliced view, respectively, to a PNG format file.

...

You must include the full path to the file or IGB will write the file to the location from where you launched IGB.

The filename defaults to "<genome_version><timestamp>.png" if not specified.

...

"select <geneids>"

Info

The snapshot and snapshotwholeFrame commands only work on Mac and Linux if attempting to export an SVG file.

Select genes

Code Block
select <geneids>

Selects the given gene IDs, which are passed in as a comma-separated format.
"sleep <milliseconds>"list.

Wait (sleep) for commands to finish

Code Block
sleep <milliseconds>

Sleep the application for x milliseconds.

Example script

genome
Panel
Note

IGB is multi-threaded, which means that the user may be able to operate IGB while data are being loaded. If your IGB script includes loading data from remote sites (e.g, RNASeq data from the IGBQuickLoad.org site) then you should include a sleep command to give IGB time to load the data.

Comments

Lines starting with the IGB script comment character '#' are ignored.

Examples

Loading a BAM file

Code Block
# select genome
genome A_thaliana_Jun_2009

goto chr4:18,040,000 - 18,045,056

load 

# go to a region in chr4
# commas are optional
goto chr4:8,860,484-8,872,096
# load a file
load http://
bioviz
igbquickload.org/
quickload
rnaseq/A_thaliana_Jun_2009/
nextgen_samples
SRP029896/
sample
ColdControl.bam
loadmode VISIBLE http

# load the data
refresh

Exporting images

https://

...

gist.github.

...

com/

...

Hillrunner2008/25976458488b65a3a25b