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
460 stars 199 forks source link

reference sequence #1593

Closed scottcain closed 3 years ago

scottcain commented 3 years ago

In a JBrowse system build from the dev branch, when a JBrowse link is pressed that has the reference sequence track turned on, when it initially loads, the reference sequence is not properly aligned with the coordinates. Turning the ref seq track off and back on again fixes it so that it is aligned. This happens in Chrome, Firefox and Safari on a Mac, and given that, I assume it happens generally.

For example, click on this link: https://wormbase.org/tools/genome/jbrowse-simple/?data=data%2Fc_elegans_PRJNA13758&loc=V%3A14373361..14373473&tracks=Curated_Genes%2CDNA&highlight= and the result will look like this:

Screen Shot 2021-04-09 at 11 43 35 AM

The Curated Genes track shows the start of translation of a gene, but notice that there is no ATG at the start of the CDS. If I close the ref seq track and turn it back on, it looks like this:

Screen Shot 2021-04-09 at 11 45 39 AM

Note the M now in phase 2 of the translation.

There is no message in the JS console on the initial load but when reopening the ref seq track, it does emit a warning saying "Uncaught TypeError: Cannot read property 'categories' of undefined". I have no idea if that is related.

Thanks to @sdiamantakis for pointing out this problem.

cmdcolin commented 3 years ago

Hmmm...I'm not able to reproduce what you are seeing on wormbase with a reduced version of the worm config locally...i'm using 1.16.11 and the config below and visiting http://localhost/jbrowse/?loc=V%3A14373361..14373472&tracks=DNA%2CCurated%20Genes%20(protein%20coding)&highlight=

{
    "refSeqs": "https://wormbase.org/tools/genome/jbrowse-simple/data/c_elegans_PRJNA13758/seq/refSeqs.json",
    "tracks": [
        {
            "unsafePopup": true,
            "codonStarts": "[ATG]",
            "key": "Reference sequence (DNA)",
            "chunkSize": 80000,
            "storeClass": "JBrowse/Store/Sequence/StaticChunked",
            "urlTemplate": "https://s3.amazonaws.com/wormbase-modencode/jbrowse/data/c_elegans_PRJNA13758/seq/{refseq_dirpath}/{refseq}-",
            "compress": 1,
            "type": "SequenceTrack",
            "label": "DNA",
            "unsafeMouseover": true
        },
        {
            "key": "Curated Genes (protein coding)",
            "onClick": {
                "url": "{transcriptURL}",
                "action": "iframeDialog",
                "title": "Feature in WormBase",
                "label": "Right/Control click for more options"
            },
            "storeClass": "JBrowse/Store/SeqFeature/NCList",
            "maxHeight": 2500,
            "category": "Genes/Curated Genes",
            "metadata": {
                "shortInfo": "A subset of the full Curated Genes set limited to protein-coding genes only. Only the CDS is represented. Full models (with UTRs) can be seen on the 'Curated Genes' track."
            },
            "unsafeMouseover": true,
            "unsafePopup": true,
            "style": {
                "className": "feature",
                "color": "{geneColor}",
                "label": "{geneLabel}"
            },
            "menuTemplate": [
                {
                    "iconClass": "dijitIconDatabase",
                    "action": "contentDialog",
                    "content": "function(track,feature){return track.browser.plugins.FeatureSequence.callFxn(track, feature); }",
                    "label": "View Sequence"
                }
            ],
            "trackType": "CanvasFeatures",
            "urlTemplate": "https://s3.amazonaws.com/agrjbrowse/MOD-jbrowses/WormBase/WS280/c_elegans_PRJNA13758/tracks/Curated Genes (protein coding)/{refseq}/trackData.jsonz",
            "compress": 1,
            "type": "CanvasFeatures",
            "label": "Curated Genes (protein coding)",
            "maxExportSpan": 50000000
        }
    ]
}

If we can isolate the minimum needed to reproduce it may be helpful

cmdcolin commented 3 years ago

If you can reproduce it with just that config then let me know also

cmdcolin commented 3 years ago

@scottcain you said maybe this is resolved now, due to duplicated refseqs in the config?

scottcain commented 3 years ago

yes, closing. Basically, I have a script that builds trackList.json automatically and it was pulling in Reference Sequence track configs for multiple C. elegans assemblies so it was not predictable which sequence you would get when you loaded the page. I've fixed it on the WormBase staging site, and the production site will be fixed within the hour.

Closing...