IGV command line control
4
0
Entering edit mode
3.6 years ago
damian.loska ▴ 20

Hi,

I know I can start IGV (Integrative Genomics Viewer, Broad Institute) providing some starting parameters (via specifying either a session file or a comma-delimited list of files to load), but is it possible somehow to control IGV from command line?

While IGV is running, I'd like to type in the terminal for example "goto chr1:65,839,697" and without closing current session and opening a new session it would go to this location.

Thanks! Damian

igv command line control remote • 5.5k views
ADD COMMENT
0
Entering edit mode

Yes, I've seen this, but as I understand it works only when I start a new session. I'd like to have a solution to interact with an active session, not via "Tools>Run Batch Script", but through command line.

ADD REPLY
0
Entering edit mode

You might want to try using the load 'file' command listed there to try and load a previously saved session .xml file or similar.

ADD REPLY
1
Entering edit mode
3.6 years ago
damian.loska ▴ 20

Ok I've solved it! I wanted to send command via my webpage. This is the example solution:

<A href='http://localhost:60151/goto?locus=Ch1:100000'>link</A>

(I thought that firstly I'd need to create some "command file", then run it via terminal to obtain the effect. The solution was much simpler for my needs)

ADD COMMENT
1
Entering edit mode
3.6 years ago

an old post : http://plindenbaum.blogspot.fr/2011/07/controlling-igv-through-port-my.html

Controlling IGV through a Port: my notebook.

Via a shell script

$ cat script.sh

mkdir -p /tmp/igv
sleep 2
echo "snapshotDirectory /tmp/igv"
sleep 2
echo "goto chr3:100"
sleep 2
echo "snapshot"
sleep 2
echo "goto chr3:200-300"
sleep 2
echo "snapshot"
sleep 2

invoke the script with telnet

$ sh script.sh |  telnet 127.0.0.1 60151
Trying 127.0.0.1...
Connected to srv-clc-02.irt.univ-nantes.prive (127.0.0.1).
Escape character is '^]'.
INFO [2011-07-27 17:58:16,680]  [CommandExecutor.java:124] [Thread-6]  OK
OK
INFO [2011-07-27 17:58:18,685]  [CommandExecutor.java:124] [Thread-6]  OK
OK
INFO [2011-07-27 17:58:18,687]  [MacroSnapshotAction.java:85] [Thread-6]  Snapshot: chr3_80_119.png
INFO [2011-07-27 17:58:20,787]  [CommandExecutor.java:124] [Thread-6]  OK
OK
INFO [2011-07-27 17:58:22,792]  [CommandExecutor.java:124] [Thread-6]  OK
OK
INFO [2011-07-27 17:58:22,794]  [MacroSnapshotAction.java:85] [Thread-6]  Snapshot: chr3_200_300.png
Connection closed by foreign host.
ADD COMMENT
0
Entering edit mode
3.6 years ago

While I've not seen any specific CLI for IGV control, one of the more useful tools I found (that you may be trying to achieve overall...), is IGV Screenshot.

ADD COMMENT
0
Entering edit mode

similar tools implemented in python here: https://github.com/stevekm/IGV-snapshot-automator

ADD REPLY
0
Entering edit mode
3.6 years ago

I've been wondering about this question in the past and I ended up writing my own tool to browse the genome from the command line, ASCIIGenome. Feel free to give it a try and post issues here or on the github repository.

ADD COMMENT

Login before adding your answer.

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