Entering edit mode
5.4 years ago
milind_ag
▴
10
Hi,
Has anyone here ever used the IGV javascript web app, and tried to embed it inside a flask server? I'm having trouble with uploading custom user defined BAM/BAI files.
Hi, I was successful in running and using the igv.js for my purposes, however I didn't use BAM/BAI. I would suggest to read carefully and/or post an issue to https://github.com/igvteam/igv.js/issues. From my experience, the response time is quite fast.
Hi, thanks for responding. They have indeed been responsive but this is something that they, unfortunately, don't support out of the box. IGV.js works great within the node app they built, but its hard to use the JS library inside custom servers, ex. Flask. Thanks again!
Well, I didn't made it clear, but I'm using the igv.js inside the Flask server ;).
So I've got the impression that the bam/bai was the main issue.
Haha the bam/bai was indeed the main issue. The files are so huge that I can't perform an actual upload. IGV.js would need to "stream" these files from a cross origin resource/server, depending on the request window (chr1: 10000-10020) . I was hoping someone knew how to do that from scratch. Their web app supports this functionality, but in-housing it is preferred due to stability reasons.
And if you're not supporting bam/bai, then what does your flask/igv hybrid do? I'm curious. ;)
I need to show genomic loci with reference and custom annotations for multiple (eg 100) sequences at once (multiple ivg instances, one web page).
To the "stream", if you mean that igv needs to read only part of the file. I've done just that - but for indexed gff and fasta files. I've needed to be able to show genomes with automatically added tracks, so the data server is the same flask server. So no cross origin requests.
From the igv.js documentation I gues that you will need the bam mimetype https://github.com/igvteam/igv.js/wiki/Data-Server-Requirements.
Oh wow, that's a lot of sequences at once! And thanks for sharing your code, this is super helpful. I will try to adapt it for BAM/BAI files. I do have to make cross-origin requests so we'll see how that works out.