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

Infinite loading segment glyphs after cache is cleared #621

Closed holmrenser closed 9 years ago

holmrenser commented 9 years ago

If I clear my browser cache (Chrome) the canvasfeatures with a 'segment' glyph permanently show the loading bar. This does not happen for canvasfeatures with a 'gene' glyph. In the console I find this error message:

In JBrowse configuration, datasets specified, but dataset_id not set.  Dataset selector will not be shown.

These glyphs worked fine before clearing the cache.

PS. I also deleted cookies

enuggetry commented 9 years ago

Hi holmrenser, did you resolve this. if not, can you share your config file?

holmrenser commented 9 years ago

This is still a problem. Here is my trackList.json:

{
  "tracks" : [
     {
        "storeClass" : "JBrowse/Store/Sequence/StaticChunked",
        "chunkSize" : 20000,
        "urlTemplate" : "seq/{refseq_dirpath}/{refseq}-",
        "label" : "DNA",
        "type" : "SequenceTrack",
        "category" : "Reference sequence",
        "key" : "Reference sequence"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#fed976"
        },
        "key" : "EvidenceModeler",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/EvidenceModeler/{refseq}/trackData.json",
        "compress" : 0,
        "label" : "EvidenceModeler",
        "type" : "CanvasFeatures",
        "category" : "Annotations/Combiners"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#fd8d3c"
        },
        "key" : "Merged.2.fixed",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_Merged.2.fixed/{refseq}/trackData.json",
        "compress" : 0,
        "category" : "Annotations/Combiners",
        "type" : "CanvasFeatures",
        "label" : "Annotations_Merged.2.fixed"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#4d4d4d",
           "strandArrow" : "false"
        },
        "key" : "repeatrunner",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_repeatrunner/{refseq}/trackData.json",
        "compress" : 0,
        "label" : "Annotations_repeatrunner",
        "type" : "CanvasFeatures",
        "category" : "Annotations/Repeats",
        "glyph" : "JBrowse/View/FeatureGlyph/Segments"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#006837"
        },
        "key" : "Augustus",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_augustus/{refseq}/trackData.json",
        "compress" : 0,
        "category" : "Annotations/Ab Initio",
        "type" : "CanvasFeatures",
        "label" : "Annotations_augustus",
        "glyph" : "JBrowse/View/FeatureGlyph/Segments"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#4292c6"
        },
        "key" : "cdna2genome",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_cdna2genome/{refseq}/trackData.json",
        "compress" : 0,
        "label" : "Annotations_cdna2genome",
        "type" : "CanvasFeatures",
        "category" : "Annotations/Transcript Evidence",
        "glyph" : "JBrowse/View/FeatureGlyph/Segments"
     },
     {
        "style" : {
           "className" : "feature",
           "color" : "#d6604d"
        },
        "key" : "Transcripts",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "trackType" : "CanvasFeatures",
        "urlTemplate" : "tracks/Annotations_maker/{refseq}/trackData.json",
        "compress" : 0,
        "label" : "Annotations_maker",
        "category" : "Annotations/Combiners",
        "type" : "CanvasFeatures"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#ce1256"
        },
        "key" : "protein2genome",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_protein2genome/{refseq}/trackData.json",
        "compress" : 0,
        "label" : "Annotations_protein2genome",
        "type" : "CanvasFeatures",
        "category" : "Annotations/Protein Evidence (SwissProt)",
        "glyph" : "JBrowse/View/FeatureGlyph/Segments"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#66bd63"
        },
        "key" : "SNAP",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_snap_masked/{refseq}/trackData.json",
        "compress" : 0,
        "category" : "Annotations/Ab Initio",
        "type" : "CanvasFeatures",
        "label" : "Annotations_snap_masked",
        "glyph" : "JBrowse/View/FeatureGlyph/Segments"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#c994c7"
        },
        "key" : "blastx",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_blastx/{refseq}/trackData.json",
        "compress" : 0,
        "label" : "Annotations_blastx",
        "type" : "CanvasFeatures",
        "category" : "Annotations/Protein Evidence (SwissProt)",
        "glyph" : "JBrowse/View/FeatureGlyph/Segments"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#d9ef8b"
        },
        "key" : "GeneMark",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_genemark/{refseq}/trackData.json",
        "compress" : 0,
        "category" : "Annotations/Ab Initio",
        "type" : "CanvasFeatures",
        "label" : "Annotations_genemark",
        "glyph" : "JBrowse/View/FeatureGlyph/Segments"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#9ecae1"
        },
        "key" : "blastn",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_blastn/{refseq}/trackData.json",
        "compress" : 0,
        "label" : "Annotations_blastn",
        "type" : "CanvasFeatures",
        "category" : "Annotations/Transcript Evidence",
        "glyph" : "JBrowse/View/FeatureGlyph/Segments"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#deebf7"
        },
        "key" : "tblastx",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_tblastx/{refseq}/trackData.json",
        "compress" : 0,
        "category" : "Annotations/Transcript Evidence",
        "type" : "CanvasFeatures",
        "label" : "Annotations_tblastx",
        "glyph" : "JBrowse/View/FeatureGlyph/Segments"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#08306b"
        },
        "key" : "est2genome",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_est2genome/{refseq}/trackData.json",
        "compress" : 0,
        "label" : "Annotations_est2genome",
        "type" : "CanvasFeatures",
        "category" : "Annotations/Transcript Evidence",
        "glyph" : "JBrowse/View/FeatureGlyph/Segments"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#878787",
           "strandArrow" : "false"
        },
        "key" : "repeatmasker",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_repeatmasker/{refseq}/trackData.json",
        "compress" : 0,
        "category" : "Annotations/Repeats",
        "type" : "CanvasFeatures",
        "label" : "Annotations_repeatmasker",
        "glyph" : "JBrowse/View/FeatureGlyph/Segments"
     },
     {
        "displayMode" : "compact",
        "style" : {
           "className" : "feature",
           "color" : "#08519c"
        },
        "key" : "transdecoder",
        "trackType" : "CanvasFeatures",
        "storeClass" : "JBrowse/Store/SeqFeature/NCList",
        "urlTemplate" : "tracks/Annotations_transdecoder/{refseq}/trackData.json",
        "compress" : 0,
        "label" : "Annotations_transdecoder",
        "type" : "CanvasFeatures",
        "category" : "Annotations/Transcript Evidence",
        "glyph" : "JBrowse/View/FeatureGlyph/Segments"
     }
  ],
  "formatVersion" : 1
}
cmdcolin commented 9 years ago

It would also help to know the structure of your GFF

Normally, if you are seeing for example that the segments aren't displaying properly when using the Gene glyph, then I would configure the

"transcriptType" and the "subParts"

These are arguments for the Gene glyph primarily. I normally use this approach instead of using the Segments glyph directly, although, it might be possible that your approach is working.

So, if you have a sample of gff3 data that you are using, that could help as well!

Cheers

holmrenser commented 9 years ago

Snapshot from one of the gff files:

PanWU01x14_asm01_scf00100       augustus        match   11893   12213   0.63    +       .       ID=PanWU01x14_asm01_scf00100:hit:3743:4.5.0.0;Name=g20594.t1;_AED=1.00;_eAED=1.00;_QI=0|-1|0|0|-1|1|1|0|106;score=0.63
PanWU01x14_asm01_scf00100       augustus        match_part      11893   12213   0.63    +       .       ID=PanWU01x14_asm01_scf00100:hsp:8094:4.5.0.0;Parent=PanWU01x14_asm01_scf00100:hit:3743:4.5.0.0;Target=g20594.t1 1 321 +;Gap=M321
PanWU01x14_asm01_scf00100       augustus        match   29453   32592   0.94    +       .       ID=PanWU01x14_asm01_scf00100:hit:3744:4.5.0.0;Name=g20595.t1;_AED=0.16;_eAED=0.16;_QI=0|1|0.5|1|1|1|4|0|385;score=0.94
PanWU01x14_asm01_scf00100       augustus        match_part      29453   29932   0.94    +       .       ID=PanWU01x14_asm01_scf00100:hsp:8095:4.5.0.0;Parent=PanWU01x14_asm01_scf00100:hit:3744:4.5.0.0;Target=g20595.t1 1 480 +;Gap=M480
PanWU01x14_asm01_scf00100       augustus        match_part      30042   30170   1       +       .       ID=PanWU01x14_asm01_scf00100:hsp:8096:4.5.0.0;Parent=PanWU01x14_asm01_scf00100:hit:3744:4.5.0.0;Target=g20595.t1 481 609 +;Gap=M129
PanWU01x14_asm01_scf00100       augustus        match_part      31418   31906   1       +       .       ID=PanWU01x14_asm01_scf00100:hsp:8097:4.5.0.0;Parent=PanWU01x14_asm01_scf00100:hit:3744:4.5.0.0;Target=g20595.t1 610 1098 +;Gap=M489
PanWU01x14_asm01_scf00100       augustus        match_part      32533   32592   1       +       .       ID=PanWU01x14_asm01_scf00100:hsp:8098:4.5.0.0;Parent=PanWU01x14_asm01_scf00100:hit:3744:4.5.0.0;Target=g20595.t1 1099 1158 +;Gap=M60
PanWU01x14_asm01_scf00100       augustus        match   36244   37410   0.79    +       .       ID=PanWU01x14_asm01_scf00100:hit:3745:4.5.0.0;Name=g20596.t1;_AED=1.00;_eAED=1.00;_QI=0|0|0|0|1|1|3|0|151;score=0.79
PanWU01x14_asm01_scf00100       augustus        match_part      36244   36435   1       +       .       ID=PanWU01x14_asm01_scf00100:hsp:8099:4.5.0.0;Parent=PanWU01x14_asm01_scf00100:hit:3745:4.5.0.0;Target=g20596.t1 1 192 +;Gap=M192
PanWU01x14_asm01_scf00100       augustus        match_part      36548   36688   1       +       .       ID=PanWU01x14_asm01_scf00100:hsp:8100:4.5.0.0;Parent=PanWU01x14_asm01_scf00100:hit:3745:4.5.0.0;Target=g20596.t1 193 333 +;Gap=M141
PanWU01x14_asm01_scf00100       augustus        match_part      37288   37410   0.79    +       .       ID=PanWU01x14_asm01_scf00100:hsp:8101:4.5.0.0;Parent=PanWU01x14_asm01_scf00100:hit:3745:4.5.0.0;Target=g20596.t1 334 456 +;Gap=M123

It is just part of the output of Maker.

PS. Like I said: initially this config works.

PPS. @cmdcolin I will try your suggestion regarding transcriptType and subParts

holmrenser commented 9 years ago

The solution provided by @cmdcolin works. Although the "strandArrow":"false" part no longer works

cmdcolin commented 9 years ago

The boolean should not be in quotes (otherwise it is a string object and is interpreted as true). That is sort of documented here http://gmod.org/wiki/JBrowse_Configuration_Guide#JavaScript_Object_Notation_.28JSON.29_Configuration_Format_.28.json.29 but is kind of just a json thing. This particular issue seems to come up a lot though so maybe jbrowse could check the types a little better.

cmdcolin commented 9 years ago

If there are any other problems feel free to re-open!