IGV on a multi-user Linux system

254 views
Skip to first unread message

kin...@gmail.com

unread,
Feb 5, 2018, 12:21:52 PM2/5/18
to igv-help
Hi, I hope this isn't a dumb question!

I'd like to load IGV onto a shared-use server I administer so that the users can view their BAM files via X-forwarding (rather than having to copy them to their desktops, which are somewhat memory constrained).

As far as I can tell from testing it seems to be quite happy with this (having IGV running from /opt/igv and added to the path) but I'm by no means an Linux expert so just wanted to check to see if there were any likely problems with this sort of arrangement.

Thank you!

Tom

James Robinson

unread,
Feb 5, 2018, 2:49:12 PM2/5/18
to igv-help
Remote performance with x-windows is really poor,  its not a supported mode because the performance is just so bad.     Performance aside, as long as every user has their own login it should work.   

Another option is to serve data with an http or https server and use URLs.    Copying BAMs to desktops is never recommended and would not be a normal use-case,  as you say they are very large.   If you have a Linux box Apache works well.

--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/8c539865-065e-404b-8b27-b94f581577cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tiff Liang

unread,
Apr 11, 2018, 7:04:53 PM4/11/18
to igv-help
Hi Jim, 

I am trying to setup an http server in our internal linux server for the same multiple viewer purpose, too. Do you have a detail instruction about how to do so? So far I have tried:
1. downloaded the binary IGV
2 .unzip
3. run: .igv.sh, it shows error: No X11 DISPLAY variable was set, but this program performed an operation which requires it
I know I don't have X11, but I don't know how to direct it to a port, such as 60151 recommended in another page. 

Thanks!
Tiff

On Monday, February 5, 2018 at 12:49:12 PM UTC-7, Jim Robinson wrote:
Remote performance with x-windows is really poor,  its not a supported mode because the performance is just so bad.     Performance aside, as long as every user has their own login it should work.   

Another option is to serve data with an http or https server and use URLs.    Copying BAMs to desktops is never recommended and would not be a normal use-case,  as you say they are very large.   If you have a Linux box Apache works well.
On Mon, Feb 5, 2018 at 9:21 AM, <kin...@gmail.com> wrote:
Hi, I hope this isn't a dumb question!

I'd like to load IGV onto a shared-use server I administer so that the users can view their BAM files via X-forwarding (rather than having to copy them to their desktops, which are somewhat memory constrained).

As far as I can tell from testing it seems to be quite happy with this (having IGV running from /opt/igv and added to the path) but I'm by no means an Linux expert so just wanted to check to see if there were any likely problems with this sort of arrangement.

Thank you!

Tom

--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+u...@googlegroups.com.

James Robinson

unread,
Apr 11, 2018, 7:08:01 PM4/11/18
to igv-help
IGV on linux requires XWindows, you cannot run it headless.     The 60151 port is just a listener for sending commands to IGV,  but it still requires a display.    There are X emualtors that I understand some groups use to produce screenshots without a physical display,  but we on the igv team have no experience with that.



To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/5bab5196-f4b4-4dd5-85eb-1cb48a0e98c2%40googlegroups.com.

Tiff Liang

unread,
Apr 11, 2018, 7:54:36 PM4/11/18
to igv-help
Thanks Jim! I also saw the igv.js that's supported by the igv team. 
All I need is setting up a port to take my *.bam file in the same linux server, and choose hg19, and provide a coordinate. Do you think igv.js will serve the purpose? I saw the git repo, but do you have more detail instruction on setting it up?

Thanks lots,

Tiff

James Robinson

unread,
Apr 11, 2018, 8:19:42 PM4/11/18
to igv-help
I don't really understand what you are trying to do.     Could you provide more details?

Tiff Liang

unread,
Apr 11, 2018, 8:38:48 PM4/11/18
to igv-help
Sure :) 

This is what's working now:
In my linux server, I already generated *.bam and *.bai files. 
I have IGV installed in my mac. hg19 is loaded. I have a coordinate for a SNP. The goal is to show others how well the alignment is at the SNP location. 
So I transfered the *.bam and *.bai file from linux server to my mac, open IGV, select hg19, and enter the coordinate. I can take a screenshot for others to view. 
However, I want to give other users URL, so they can view all the alignments. 

Here is what I want to do:
I have apache setup in my linux server, without X-window. I need a IGV running in the server, and I can pass it hg19, *.bam file, and the specific coordinate. 
I am hoping to assign a port to IGV, then other users can view the alignment and SNP on the browser. It will be good to be interactive. But I can accept a screetshot png if that's not ready. So i can just email a link to users from linux server. 

I want to avoid the downloading .bam file process, and to avoid looking at data from 2 different platforms. 

Thanks!

Tiff

James Robinson

unread,
Apr 11, 2018, 8:44:08 PM4/11/18
to igv-help
If you serve the bam files by http or https on your apache server you could create a webpage for the bam embedding igv.js.   There is lots of documentation and examples in the igv.js github wiki.    This is a javascript component, not an end-user client,  you need to be able to create webpages and write some javascript.   However,  you cannot at this time specify coordinates in the URL.   That will come in the near future.

The other option is to load the bam by URL into IGV desktop running on you mac or pc,  then save the session file and email the session for other users to load into IGV.   This assumes they have installed IGV.



--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/d85b62d2-0eb1-4b82-95e7-5ca3d9b9cce9%40googlegroups.com.

James Robinson

unread,
Apr 12, 2018, 12:48:06 AM4/12/18
to igv-help
For testing you can try our test distribution here, in which you can use a limited set of query parameters:  http://igv.org/web/test/

Specifically, use this url or copy the html and serve locally:  http://igv.org/web/test/examples/igvjs.html.   You can also get the html from the examples directory in the igv.js repository.    In this test version 3 parameters are supported:   genome, file, and locus.   

Example URL loading 1 bam and 1 annotation track for hg19 at locus MYC:  


See the igv.js wiki for more details.   


Note that query parameter values must be URI Encoded.   You can encode them here,  just paste in the un-encoded value and hit "Decode":  https://meyerweb.com/eric/tools/dencoder/

Again,  I suggest you use examples/igvjs.html as a starting point.


Tiff Liang

unread,
Apr 12, 2018, 1:35:17 PM4/12/18
to igv-help
Very appreciate your help! 
Somehow the igvjs.html page and the Example below is blank. However, I saw the htsget.html example has coordinate input option. I'll try that one for now. Thanks lots!

Tiff
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+u...@googlegroups.com.

James Robinson

unread,
Apr 12, 2018, 4:58:00 PM4/12/18
to igv-help
Tiff,  sorry, misunderstaning, I meant to point you to this link:  http://igv.org/web/test/examples/igv-links.html.

 igvjs.html  is blank until you supply parameters.   That is the point of it.   

Tiff Liang

unread,
Apr 12, 2018, 9:05:49 PM4/12/18
to igv-help
Thanks Jim! I can see those examples now. 
I'm able to download the js code from git, and grunt it, and run it using Webstorm. Everything works and I can see alignments with genes.
Since I have my bam file, I modified the code in test.html, the part for Google Cloud Storage - NA12877_SI.bam
just the url part to below but doesn't work. I tried using just a location directory bam file that works in desktop IGV, also tried using a exist bam file in your test folder. Can't get it to work. 
I think I still have a long to master HTML5 and JS. Do you have some tips for me to speed up? Thanks!

<div onclick="igv.browser.loadTrack({
sourceType: 'gcs',
type: 'bam',
//url: '/Users/tiffL/Documents/bfx_request/Sample_1139/test.bam',
url: './test/data/bam/gstt1_sample.bam',
height: 500,
autoHeight: true,
viewAsPairs: false,
name: 'NA12877'})">test.bam
</div>

Tiff

James Robinson

unread,
Apr 12, 2018, 11:13:19 PM4/12/18
to igv-help
Look at the console in Chrome's developer tools, and also the network traffic,  to see what's wrong.     Webstorm does not support range byte requests,  so if you are serving the bam using Webstorm its not going to work.   See the data server requriements in the wiki.   Apaches will work if you configure it as instructed there.

--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/41a0e116-88c5-4eda-bd70-2f8c3bca7aeb%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages