Tool:Automatic IGV snapshot script
0
19
Entering edit mode
7.7 years ago
steve ★ 3.5k

I've been using IGV batchscripts to create automated programmatic snapshots of genome coverages and variants for ChIP-Seq and whole exome samples, and thought it would be helpful to have a stand-alone script that handled this. So I put together this IGV Snapshot Automator:

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

Just put the regions you want to take snapshots of in the 'regions.bed' file, and pass the files you want visualized as arguments. The script will handle the rest. It also has some options for specifying different regions files, memory settings, track height, reference genome, and IGV binary location (in case you've already got it installed elsewhere).

The best part of this is that it can run headlessly on your Linux server, where the data reside. See the notes in the repo for details.

Example output:

chr1_713500_714900_h500

ChIP-Seq IGV • 9.4k views
ADD COMMENT
0
Entering edit mode

I've forked the project. It works. +1. Well done!

ADD REPLY
0
Entering edit mode

Hi Steve,

I'm trying to use your tool to view bam files located on a remote server. I'm getting an error when I tried running the demo. See below. Could you please advice how to fix or troubleshoot this error. Thank you.

Read 4 regions xdpyinfo: unable to open display ":1".

Open Xvfb port found on: 1

IGV command is: xvfb-run --auto-servernum --server-num=1 java -Xmx4000m -jar bin/IGV_2.3.81/igv.jar -b IGV_Snapshots/IGV_snapshots.bat

Current time is: 2019-11-08 10:39:11.591101

Running the IGV command... /bin/sh: 1: xvfb-run: not found b''

IGV finished; elapsed time is: 0:00:00.001426

ADD REPLY
0
Entering edit mode

Yes it means that you do not have the program xvfb-run installed on your system. It is a wrapper script that often comes bundled with your server X11 installation. Unfortunately I am not sure that I can provide a copy because from what I've seen it can be a little platform specific. For this reason, I recently included the container recipe file Singularity and subsequent Singularity running wrapper scripts, in case your system has Singularity installed so that you might be able to build the IGV container yourself and run that way. Otherwise your best bet would be to get the server admins to install xvfb-run. Or you could try to use an older version of the repo to remove the xvfb-run command; this is the commit where I changed it for simplicity, you can see the old command listed there that did not use it. https://github.com/stevekm/IGV-snapshot-automator/commit/f65a5fff9d53909c4289ca5d7f1f4d825e57dc97

Perhaps some combination of these will help. Might be easiest to just modify the xvfb command in the current repo to match the old one. Hope this helps let me know if you're still having issues (you can also post them in the Issues tracker on the repo)

ADD REPLY
0
Entering edit mode

Hi Steve, do you know if the script you wrote can be easily modified to read in different file types, such as .tdf files, instead of .bam files? Thanks!

ADD REPLY
0
Entering edit mode

The usage of .bam files or any other format is entirely dependent on IGV. Have you tried using it with .tdf files? Let me know if it doesn't work. Though if it does not work, you would have to investigate the IGV batch script commands needed to use them, since this tool is really just a wrapper around IGV's own batch script system + X11 virtual window for rendering.

ADD REPLY

Login before adding your answer.

Traffic: 1758 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