Is it possible to run IGV in batch mode without opening the GUI?
2
1
Entering edit mode
2.1 years ago
elcortegano ▴ 100

I'm running IGV in batch mode following the steps described in the IGV website.

When I enter a command like the following one in the terminal, IGV opens, runs as expected, and saves a snapshot. Everything OK.

bash igv.sh --batch=script.txt

However, this is done by opening IGV including its graphical user interface (GUI). I think this is unnecessary and probably slows the program, but so far I have not been able to run IGV in batch mode without a GUI being opened automatically, nor when I remove the new header command in the script, which is supposed to "open a new session" .

Any ideas on how to run IGV purely in CLI mode?

next-gen alignment igv • 2.2k views
ADD COMMENT
5
Entering edit mode
2.1 years ago
steve ★ 3.0k

Yes. Check out the script here, which can create and run your IGV snapshots on a .bam file with a .bed file as target regions to snapshot:

https://github.com/stevekm/IGV-snapshot-automator

It uses xvfb in an automated fashion as described by Pierre.

If you just want the CLI command to use, it would be something like this:

xvfb-run --auto-servernum --server-num=1 java -Xmx4000m -jar bin/IGV_2.3.81/igv.jar -b igv_script.bat

Note that xvfb-run is a wrapper script that usually comes with your system's xvfb installation, but may be platform-specific.

ADD COMMENT
3
Entering edit mode

xvfb-run --auto-servernum igv.sh -b script.bat worked for my, thank you!!

ADD REPLY
1
Entering edit mode
2.1 years ago

open igv using an offscreen server: Xvfb https://en.wikipedia.org/wiki/Xvfb

Xvfb or X virtual framebuffer is a display server implementing the X11 display server protocol. In contrast to other display servers, Xvfb performs all graphical operations in virtual memory without showing any screen output.

but it's cumbersome

or follow: Visualizing & plotting variant reads within BAM files programmatically? ; Alignment plot of a small extract (sequence) from a .bam file : Visualization tool integrating point mutations, copy number alterations, and structural variations ; etc...

ADD COMMENT

Login before adding your answer.

Traffic: 2530 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6