igvteam / igv

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

Avoid reloading .genome file #1034

Open stefan-leye opened 3 years ago

stefan-leye commented 3 years ago

For our customers we host a custom .genome file on S3, which we provide via URL in a session.xml. Everytime IGV loads such a session.xml, the .genome file is downloaded again (even though URL, name and version are the same, as it is exactly the same file). This is not only very annoying for our customers, but makes it impossible to merge sessions.

Internally we discussed training our customers to download the.genome file and load it into IGV by hand. But this seems not feasible, as it is error prone and a bit complicated for those customers that are technically not well-versed.

Could you please add an option to just reuse an already downloaded .genome file, if it is referenced ina second session.xml?

jrobinso commented 3 years ago

Yes that would get annoying. We can prevent the duplicate loading when a second session file is loaded, but the genome file will still get loaded each time the user starts igv and loads a session. This could conceivably be prevented as well with some persistent sort of url -> genome file name cache, but then it would be difficult to ever update the .genome file. For example to update annotations.

You can prevent both with the current release by defining a custom genome list file, and referencing the genomes in the session by ID rather than URL. The users would need to set the URL to the genome list file once in the "Advanced" preferences, or you could distribute a custom "prefs.properties" file with this set which they would save in the "igv" folder. The starting point for the custom file would be one of the URLs below. The only difference is the use of ".json" files for some assemblies instead of .genome for 2.11.0 IGV. Versions earlier than 2.11 do not support the json format.

IGV versions >= 2.11.0. https://s3.amazonaws.com/igv.org.genomes/genomes.tsv

or, IGV versions < 2.11. https://s3.amazonaws.com/igv.org.genomes/genomes.txt

stefan-leye commented 2 years ago

Sorry for the late reply! Thanks for your hints. The genomes.tsv way seems to work for us.

jrobinso commented 2 years ago

@stefan-leye great, but I'll leave this open for now I want to look into the original issue.