g2nb / igv-jupyter

Extension for Jupyter which integrates igv.js
MIT License
154 stars 13 forks source link

.show() produces no output when offline #46

Closed sigurjonaxel closed 3 years ago

sigurjonaxel commented 3 years ago

Hi,

Thank you for creating this usefool tool! It works nicely when I run it on a computer connected to the internet, but same setup does not work when the computer is offline.

.show() gives no output, only popup window that says "undefined" when offline. I'm using the LocalFiles.ipynb example notebook. Is it to be expected that it will not work offline, or do you think there could be something wrong in my environment on the offline machine?

tmtabor commented 3 years ago

Thanks for bringing this to our attention. We'll get a better fix in place soon.

In the meantime, you can work offline by turning off loading default genomes. Just add "loadDefaultGenomes": False to the browser config. For example:

b = igv.Browser({
    "reference": {
        "id": "hg19",
        "fastaURL": "data/hg19.snippet.fasta",
        "indexed": False,
        "cytobandURL": "data/cytoband.hg19.snippet.txt",
    },
    "loadDefaultGenomes": False
    }
)

This prevents the error that you are seeing when offline.

sigurjonaxel commented 3 years ago

Thank you for the solution to this issue. Works perfectly now when offline.