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

issues with loading reference using absolute URLs #30

Open
nettanetta opened this issue Jan 16, 2024 · 2 comments
Open

issues with loading reference using absolute URLs #30

nettanetta opened this issue Jan 16, 2024 · 2 comments

Comments

@nettanetta
Copy link

Hi,
I tried to load reference files and bed tracks using URLs as explained in this example.
However, nothing is presented.
When I try to copy the example notebook it works fine. when I manually load the file to the IGV web app it also works fine.

my code:
b = igv_notebook.Browser( { "reference": { "fastaURL": "https://files.cs.huji.ac.il/morani/Netta/ginger/atcc_aligners_comparison/genomes.fasta", "indexURL": "https://files.cs.huji.ac.il/morani/Netta/ginger/atcc_aligners_comparison/genomes.fasta.fai", }, "roi": [ { "name": "tblastn_protein_genes_to_genomes", "url": "https://files.cs.huji.ac.il/morani/Netta/ginger/atcc_aligners_comparison/blast/tblastn_protein_genes_to_genomes.tsv.bed", "indexed": False, }, { "name": "tblastn_protein_genes_to_genomes_nms", "url": "https://files.cs.huji.ac.il/morani/Netta/ginger/atcc_aligners_comparison/blast/tblastn_protein_genes_to_genomes.tsv.nms.bed", "indexed": False, } ] })

Can you help me understand what's wrong?
thanks
Netta

@jrobinso
Copy link
Contributor

Can you describe in a little more detail what goes wrong? A screenshot might help. Also, check the console for errors in the devleoper tools of your web browser.

@jrobinso
Copy link
Contributor

I think the root of the problem can be found in the console,

Access to XMLHttpRequest at 'https://files.cs.huji.ac.il/morani/Netta/ginger/atcc_aligners_comparison/genomes.fasta.fai' from origin 'http://localhost:8888' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
It appears the server (https://files.cs.huji.ac.il) does not support CORS requests, which is required for all javascript access on the web. This is fairly easy to configure on most servers, see https://github.com/igvteam/igv.js/wiki/Data-Server-Requirements for more details

A couple of other possible issues. Did you run igv_notebook.init() before other commands? This is required, it should be executed once. Secondly, you have not loaded any tracks in your example, only regions of interest (ROI). So there are no tracks to display. For more details on configuration see the igv.js documentation https://github.com/igvteam/igv.js/wiki

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