Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encoding JSON in the URL #133

Open
nvnieuwk opened this issue Feb 22, 2024 · 2 comments
Open

Encoding JSON in the URL #133

nvnieuwk opened this issue Feb 22, 2024 · 2 comments
Assignees

Comments

@nvnieuwk
Copy link

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

@sehilyi
Copy link
Member

sehilyi commented Mar 5, 2024

This is a great suggestion! We will discuss the support of this feature with the team this/next week and let you know here when/how we will support this!

@nvnieuwk
Copy link
Author

nvnieuwk commented Mar 7, 2024

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants