GMOD / jbrowse

JBrowse 1, a full-featured genome browser built with JavaScript and HTML5. For JBrowse 2, see https://github.com/GMOD/jbrowse-components.
http://jbrowse.org
Other
463 stars 199 forks source link

Some browser can not display the bam file #1542

Closed Trandamere closed 3 years ago

Trandamere commented 4 years ago

Hi: The BAM file cannot be displayed in part of the browser. 1 Bam files can be displayed in GoogleBrowser, but not in Microsoft Browser.How can I avoid it. I see that your presentation can be viewed in any browser.

cmdcolin commented 4 years ago

What server are you using? You should give status 206 for responses to range requests

Trandamere commented 4 years ago

centos 7.6 nginx Microsoft Edge browser

cmdcolin commented 4 years ago

Can you post a link to the live instance by chance? Can send me an email if it is helpful

Trandamere commented 4 years ago

http://123.56.75.179/HTML

cmdcolin commented 4 years ago

I believe you have to disable mime_magic on your server. This is a common issue on CentOS +Apache for us unfortunately

see http://gmod.org/wiki/JBrowse_Configuration_Guide#Apache_Configuration_Note

(the response from the network indicates the server is apache not nginx from what I can tell)

The reason it works on chrome is that chrome has some fancy logic that smooths over this issue

Trandamere commented 4 years ago

thanks

Trandamere commented 4 years ago

Hi: I added parameters to the configuration file, but it didn't work

    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
    AddType application/octet-stream .bam .bami .bai

1 FireFox browser

cmdcolin commented 4 years ago

What the issue boils down to is your server is sending this header in response to a BAM range request

Content-Encoding: gzip

Screenshot from 2020-09-13 13-33-11

This confuses jbrowse and cannot be handled because the browser unzips the BAM content as a gzip, whereas jbrowse is normally in charge of unzipping

I would suggest to disable mime_magic module entirely. If that is not possible I can't really guide the particular set of AddType that would help

You can look in the jbrowse mailing list archive for more details (gmod-ajax@lists.sourceforge.net) or github issues but I don't know what would help

This is really more of a server side issue than a jbrowse issue unfortunately :{

cmdcolin commented 4 years ago

To be clear, requests for a BAM file should not have Content-Encoding: gzip headers on them

cmdcolin commented 3 years ago

maybe close for now...known issue with server side config so sort of outside jbrowse scope