igvteam / igv

Integrative Genomics Viewer. Fast, efficient, scalable visualization tool for genomics data and annotations
https://igv.org
MIT License
646 stars 387 forks source link

IGV does not work offline #679

Closed ranasats closed 5 years ago

ranasats commented 5 years ago

Essentially, I want to run IGV on a machine that is fully offline. I have the hg19 genome file, and when loading it via CLI, it errors out saying that IGV can't reach the servers. Is there anyway to load IGV on a machine which doesn't have internet access?


WARNING: package com.sun.java.swing.plaf.windows not in java.desktop
WARNING: package sun.awt.windows not in java.desktop
WARN [2019-08-21T13:08:01,089]  [Globals.java:138] [AWT-EventQueue-0]  Development mode is enabled
INFO [2019-08-21T13:08:01,119]  [DirectoryManager.java:179] [AWT-EventQueue-0]  IGV Directory: /home/xxxxxx/igv
INFO [2019-08-21T13:08:01,153]  [Main.java:156] [AWT-EventQueue-0]  Startup  IGV Version 2.5.3 05/29/2019 10:59 AM
INFO [2019-08-21T13:08:01,182]  [Main.java:157] [AWT-EventQueue-0]  Java 11.0.2 (build 11.0.2+9) 2019-01-15
INFO [2019-08-21T13:08:01,184]  [Main.java:160] [AWT-EventQueue-0]  Java Vendor: AdoptOpenJDK https://adoptopenjdk.net/
INFO [2019-08-21T13:08:01,186]  [Main.java:162] [AWT-EventQueue-0]  JVM: OpenJDK 64-Bit Server VM AdoptOpenJDK
INFO [2019-08-21T13:08:01,186]  [DirectoryManager.java:84] [AWT-EventQueue-0]  Fetching user directory...
INFO [2019-08-21T13:08:01,273]  [Main.java:165] [AWT-EventQueue-0]  Default User Directory: /home/xxxxxx
INFO [2019-08-21T13:08:01,274]  [Main.java:166] [AWT-EventQueue-0]  OS: Linux 2.6.32-431.11.2.el6.x86_64 amd64
ERROR [2019-08-21T13:08:01,649]  [Main.java:221] [Thread-2]  Error checking version
java.net.ConnectException: Network is unreachable (connect failed)
    at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[?:?]
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[?:?]
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[?:?]
    at java.net.SocksSocketImpl.connect(Unknown Source) ~[?:?]
    at java.net.Socket.connect(Unknown Source) ~[?:?]
    at sun.security.ssl.SSLSocketImpl.connect(Unknown Source) ~[?:?]
    at sun.net.NetworkClient.doConnect(Unknown Source) ~[?:?]
    at sun.net.www.http.HttpClient.openServer(Unknown Source) ~[?:?]
    at sun.net.www.http.HttpClient.openServer(Unknown Source) ~[?:?]
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source) ~[?:?]
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source) ~[?:?]
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) ~[?:?]
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) ~[?:?]
    at java.net.HttpURLConnection.getResponseCode(Unknown Source) ~[?:?]
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source) ~[?:?]
    at org.broad.igv.util.HttpUtils.openConnection(HttpUtils.java:816) ~[igv.jar:?]
    at org.broad.igv.util.HttpUtils.openConnection(HttpUtils.java:689) ~[igv.jar:?]
    at org.broad.igv.util.HttpUtils.openConnection(HttpUtils.java:685) ~[igv.jar:?]
    at org.broad.igv.util.HttpUtils.getContentsAsString(HttpUtils.java:193) ~[igv.jar:?]
    at org.broad.igv.util.HttpUtils.getContentsAsString(HttpUtils.java:185) ~[igv.jar:?]
    at org.broad.igv.ui.Main.lambda$checkVersion$0(Main.java:199) [igv.jar:?]
    at java.lang.Thread.run(Unknown Source) [?:?]
Aug 21, 2019 1:08:02 PM java.util.prefs.FileSystemPreferences$6 run
WARNING: Prefs file removed in background /home/xxxxxx/.java/.userPrefs/prefs.xml
ERROR [2019-08-21T13:08:02,166]  [IGVMenuBar.java:188] [AWT-EventQueue-0]  Error creating google menu: Network is unreachable (connect failed)
INFO [2019-08-21T13:08:02,848]  [GenomeManager.java:195] [pool-3-thread-1]  Loading genome: /home/xxxxxx/igv/genomes/hg19.genome
INFO [2019-08-21T13:08:03,208]  [MessageUtils.java:76] [pool-3-thread-1]  <html>Unexpected error: Server connection error.<br>See igv.log for more details
ERROR [2019-08-21T13:08:03,208]  [LongRunningTask.java:75] [pool-3-thread-1]  Exception running task
java.lang.RuntimeException: Server connection error
    at org.broad.igv.feature.genome.GenomeManager.loadGenome(GenomeManager.java:292) ~[igv.jar:?]
    at org.broad.igv.feature.genome.GenomeManager.loadGenomeById(GenomeManager.java:180) ~[igv.jar:?]
    at org.broad.igv.ui.IGV$StartupRunnable.run(IGV.java:2079) ~[igv.jar:?]
    at org.broad.igv.util.LongRunningTask.call(LongRunningTask.java:72) [igv.jar:?]
    at java.util.concurrent.FutureTask.run(Unknown Source) [?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:?]
    at java.lang.Thread.run(Unknown Source) [?:?]
Caused by: java.net.ConnectException: Network is unreachable (connect failed)
    at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) ~[?:?]
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) ~[?:?]
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source) ~[?:?]
    at java.net.SocksSocketImpl.connect(Unknown Source) ~[?:?]
    at java.net.Socket.connect(Unknown Source) ~[?:?]
    at sun.security.ssl.SSLSocketImpl.connect(Unknown Source) ~[?:?]
    at sun.net.NetworkClient.doConnect(Unknown Source) ~[?:?]
    at sun.net.www.http.HttpClient.openServer(Unknown Source) ~[?:?]
    at sun.net.www.http.HttpClient.openServer(Unknown Source) ~[?:?]
    at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source) ~[?:?]
    at sun.net.www.protocol.https.HttpsClient.New(Unknown Source) ~[?:?]
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(Unknown Source) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source) ~[?:?]
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) ~[?:?]
    at java.net.HttpURLConnection.getResponseCode(Unknown Source) ~[?:?]
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source) ~[?:?]
    at org.broad.igv.util.HttpUtils.openConnection(HttpUtils.java:816) ~[igv.jar:?]
    at org.broad.igv.util.HttpUtils.openConnection(HttpUtils.java:689) ~[igv.jar:?]
    at org.broad.igv.util.HttpUtils.openConnection(HttpUtils.java:685) ~[igv.jar:?]
    at org.broad.igv.util.HttpUtils.openConnectionStream(HttpUtils.java:290) ~[igv.jar:?]
    at org.broad.igv.util.HttpUtils.openConnectionStream(HttpUtils.java:284) ~[igv.jar:?]
    at org.broad.igv.util.ParsingUtils.openInputStreamGZ(ParsingUtils.java:111) ~[igv.jar:?]
    at org.broad.igv.util.ParsingUtils.openInputStream(ParsingUtils.java:96) ~[igv.jar:?]
    at org.broad.igv.util.ParsingUtils.openBufferedReader(ParsingUtils.java:78) ~[igv.jar:?]
    at org.broad.igv.feature.genome.fasta.FastaIndex.parseIndexFile(FastaIndex.java:89) ~[igv.jar:?]
    at org.broad.igv.feature.genome.fasta.FastaIndex.<init>(FastaIndex.java:55) ~[igv.jar:?]
    at org.broad.igv.feature.genome.fasta.FastaIndexedSequence.<init>(FastaIndexedSequence.java:65) ~[igv.jar:?]
    at org.broad.igv.feature.genome.fasta.FastaIndexedSequence.<init>(FastaIndexedSequence.java:56) ~[igv.jar:?]
    at org.broad.igv.feature.genome.fasta.FastaBlockCompressedSequence.<init>(FastaBlockCompressedSequence.java:30) ~[igv.jar:?]
    at org.broad.igv.feature.genome.fasta.FastaBlockCompressedSequence.<init>(FastaBlockCompressedSequence.java:25) ~[igv.jar:?]
    at org.broad.igv.feature.genome.GenomeManager.loadDotGenomeFile(GenomeManager.java:548) ~[igv.jar:?]
    at org.broad.igv.feature.genome.GenomeManager.loadGenome(GenomeManager.java:216) ~[igv.jar:?]
    ... 7 more```

This same error occurs when strictly defining the path to the hg19 genome file as well.
jrobinso commented 5 years ago

You can run igv offline, i do it myself. Is the fasta file and index also local?

ranasats commented 5 years ago

Yes, all files are local. The above error is simply trying to even launch IGV on a node that has no internet access.

I'm loading as such: jdk-11/bin/java --module-path=lib -Xmx4g @igv.args --module=org.igv/org.broad.igv.ui.Main -g hg19 --batch test.igv where the test.igv batch file contains all local bams/tracks.

jrobinso commented 5 years ago

Try using the full path to your fasta instead of the genome id or .genome file.

How did you create this .genome file?

ranasats commented 5 years ago

So I did some testing and figured out I need to specify the fasta file as a genome in the batch file which I'm running in order to have IGV load the genome offline. It -still- tries loading from online, gives an HTTP error, the same as above, and then continues on as if it's fine.

ranasats commented 5 years ago

Actually, the above did not solve the issue for genome loading. Posting error below:


ERROR [2019-10-21T17:49:10,773]  [IGVCommandBar.java:175] [pool-3-thread-2]  Error loading genome: /home/ranas/igv/genomes/hg19.genome
java.net.SocketTimeoutException: connect timed out
    at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:?]
    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:399) ~[?:?]
    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:242) ~[?:?]
    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:224) ~[?:?]
    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:403) ~[?:?]
    at java.net.Socket.connect(Socket.java:591) ~[?:?]
    at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:285) ~[?:?]
    at sun.net.NetworkClient.doConnect(NetworkClient.java:177) ~[?:?]
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:474) ~[?:?]
    at sun.net.www.http.HttpClient.openServer(HttpClient.java:569) ~[?:?]
    at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:265) ~[?:?]
    at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:372) ~[?:?]
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:191) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1181) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:1075) ~[?:?]
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1581) ~[?:?]
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1509) ~[?:?]
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527) ~[?:?]
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:329) ~[?:?]
    at org.broad.igv.util.HttpUtils.openConnection(HttpUtils.java:816) ~[igv.jar:?]
    at org.broad.igv.util.HttpUtils.openConnection(HttpUtils.java:689) ~[igv.jar:?]
    at org.broad.igv.util.HttpUtils.openConnection(HttpUtils.java:685) ~[igv.jar:?]
    at org.broad.igv.util.HttpUtils.openConnectionStream(HttpUtils.java:290) ~[igv.jar:?]
    at org.broad.igv.util.HttpUtils.openConnectionStream(HttpUtils.java:284) ~[igv.jar:?]
    at org.broad.igv.util.ParsingUtils.openInputStreamGZ(ParsingUtils.java:111) ~[igv.jar:?]
    at org.broad.igv.util.ParsingUtils.openInputStream(ParsingUtils.java:96) ~[igv.jar:?]
    at org.broad.igv.util.ParsingUtils.openBufferedReader(ParsingUtils.java:78) ~[igv.jar:?]
    at org.broad.igv.feature.genome.fasta.FastaIndex.parseIndexFile(FastaIndex.java:89) ~[igv.jar:?]
    at org.broad.igv.feature.genome.fasta.FastaIndex.<init>(FastaIndex.java:55) ~[igv.jar:?]
    at org.broad.igv.feature.genome.fasta.FastaIndexedSequence.<init>(FastaIndexedSequence.java:65) ~[igv.jar:?]
    at org.broad.igv.feature.genome.fasta.FastaIndexedSequence.<init>(FastaIndexedSequence.java:56) ~[igv.jar:?]
    at org.broad.igv.feature.genome.fasta.FastaBlockCompressedSequence.<init>(FastaBlockCompressedSequence.java:30) ~[igv.jar:?]
    at org.broad.igv.feature.genome.fasta.FastaBlockCompressedSequence.<init>(FastaBlockCompressedSequence.java:25) ~[igv.jar:?]
    at org.broad.igv.feature.genome.GenomeManager.loadDotGenomeFile(GenomeManager.java:548) ~[igv.jar:?]
    at org.broad.igv.feature.genome.GenomeManager.loadGenome(GenomeManager.java:216) ~[igv.jar:?]
    at org.broad.igv.feature.genome.GenomeManager.loadGenomeById(GenomeManager.java:165) ~[igv.jar:?]
    at org.broad.igv.ui.commandbar.IGVCommandBar.selectGenome(IGVCommandBar.java:172) [igv.jar:?]
    at org.broad.igv.ui.IGV.selectGenomeFromList(IGV.java:376) [igv.jar:?]
    at org.broad.igv.batch.CommandExecutor.genome(CommandExecutor.java:373) [igv.jar:?]
    at org.broad.igv.batch.CommandExecutor.execute(CommandExecutor.java:129) [igv.jar:?]
    at org.broad.igv.batch.BatchRunner.run(BatchRunner.java:73) [igv.jar:?]
    at org.broad.igv.util.LongRunningTask.call(LongRunningTask.java:72) [igv.jar:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
    at java.lang.Thread.run(Thread.java:834) [?:?]
INFO [2019-10-21T17:49:10,775]  [GenomeManager.java:195] [pool-3-thread-2]  Loading genome: /home/ranas/igv/genomes/hg19.genome
INFO [2019-10-21T17:49:30,955]  [MessageUtils.java:76] [pool-3-thread-2]  ERROR: Could not load genome: /home/ranas/igv/genomes/hg19.genome
INFO [2019-10-21T17:49:32,957]  [CommandExecutor.java:218] [pool-3-thread-2]  ERROR: Could not load genome: /home/ranas/igv/genomes/hg19.genome

The genome above is the same .genome file I copied from a node that does have online access. Identical systems between online/offline nodes.

jrobinso commented 5 years ago

You can't use a .genome file here, you have to use a fasta, unless that .genome file has been defined to point to a local fasta. A .genome file is just a small zip archive, it does not contain the fasta just a pointer to it. Don't use .genome files here they aren't neccessary, just use a fasta (indexed).

If that doesn't resolve your issue post your batch file here. Obviously I won't have access to your fasta but I can change that bit.