Unable to open bam files if extension is not defined

98 views
Skip to first unread message

marc....@genomcore.com

unread,
Dec 12, 2018, 1:11:09 PM12/12/18
to igv-help
Hello,

I am trying to load a bam file and its index into IGV from my AWS S3 bucket. I am using presigned URLs for this purpose, which allows to open the file remotelly with a temporary link, without providing my bucket credentials.

With my test files these works fine, both bam and bai files are loaded correctly and I can navigate them with almost no delay.

The problem comes when I incorporate this into my app. Files are stored in S3 using a key instead of the file name to avoid colisions. The extension therefore is not present in the file name. When I try to load these files from the URL IGV prompts a message stating "Unknown file type: Please check file extension". Both files are indeed bam and bai but it seems IGV is not able to recognize it unless the file extension is correct. 

I have already tried modifying the attachment name in the 'Content-Disposition' header of the Response but it hasn't worked either, apparently what defines the extension is the file name in the URL.

Is there any way to set IGV to ignore file extensions? I don't think is possible to change the file name in the url as I must match the object key in the S3 bucket and including the file extension in all file will be very time consuming.

Thanks in advance

Running:
Ubuntu 18.04 LTS
IGV 2.4.16

James Robinson

unread,
Dec 12, 2018, 1:28:12 PM12/12/18
to igv-help
The extension is required, ther are ~ 50 file format types supported and that is how it determines what you are loading.  If you are able to adding query parameters you can try supplying extension by giving it a fake filename as a parameter,  for example

https://s3.../adfda?filename=foo.bam

or explicity set the format as

?dataformat=.bam

A caveat -- these parameters were added for a different purpose and haven't been tested with Amazon S3,  the server might not allow the parameters as that could change the signature of the URL.


--

---
You received this message because you are subscribed to the Google Groups "igv-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to igv-help+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/igv-help/4155114a-c891-4ddd-ae86-20e14e487efd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

marc....@genomcore.com

unread,
Dec 13, 2018, 4:01:39 AM12/13/18
to igv-help
After few tries, I managed to add "dataformat" parameter into a valid presignedURL and load the file correctly in IGV. However, the option is only available in JS AWS SDK as far as I could see.

Btw, "filename" parameter does not seem to work.

Thanks for your help and quick reply James
Reply all
Reply to author
Forward
0 new messages