chromoscope
chromoscope copied to clipboard
Encoding JSON in the URL
Hi would it be possible to encode the JSON file into the URL (using base64encode
for example). This would make it a lot easier to redirect users dynamically for only the samples they want instead of having to make a JSON file for every possibility.
Example: This JSON data has been encoded in the URL:
{
"genome": "hg38",
"tracks": [
{
"type": "alignment",
"name": "HG00103",
"url": "https://s3.amazonaws.com/1000genomes/data/HG00103/alignment/HG00103.alt_bwamem_GRCh38DH.20150718.GBR.low_coverage.cram",
"indexURL": "https://s3.amazonaws.com/1000genomes/data/HG00103/alignment/HG00103.alt_bwamem_GRCh38DH.20150718.GBR.low_coverage.cram.crai",
"format": "cram"
}
]
}
URL: https://igv.org/app/?sessionURL=blob:xY67DoIwFIZfhXQ2vUiMhFFNYHAicTKGHEsFIm1JW0UlvLsU1FdwOcN__svXo1IoLQWKA1SVYYQWAXIG.NWOyrFH7tlOP2jqUkmhnDcomANpQimjoZduppkqnGttTIgNMUh4aQWdxVxLwiil85IlBTggnyz5FX8VDI3Lz904IfMk21ZhtEvxkrIVXbMIJ5sMN7rLub4LA6XA3ID0ALUqxOOQ7f9H4U_tUS7aSHAeZIIbTsMb
An example python script I used to generate this URL: https://github.com/nvnieuwk/python-scripts/blob/main/encode_igv_session.py
I hope this will be possible to add!
-Nicolas