GMOD / Apollo

Genome annotation editor with a Java Server backend and a Javascript client that runs in a web browser as a JBrowse plugin.
http://genomearchitect.readthedocs.io/
Other
128 stars 85 forks source link

Changes to canvasfeatures color / css? #1393

Closed hexylena closed 7 years ago

hexylena commented 7 years ago

I noticed that on more recent builds of apollo (admittedly this hasn't been tested in a while), colors are not rendered quite properly for my canvas features (and completely disabled with HTML features due to style overrides...)

Correct output (as seen in JBrowse by itself): utvalg_057

With a hard-coded color in Apollo: utvalg_055

Hovering over them causes them to go blue and then grey utvalg_056

With the proper color function that works fine in JBrowse: utvalg_058

Here's my trackList.json

      {
         "urlTemplate" : "tracks/7546be86a2de96546f3df84dbfb49bb4_0/{refseq}/trackData.json",
         "glyph" : "JBrowse/View/FeatureGlyph/Segments",
         "type" : "JBrowse/View/Track/CanvasFeatures",
         "key" : "Canonical Phages",
         "style" : {
            "description" : "Hit_titles",
            "label" : "description",
            "color" : "    function(feature, variableName, glyphObject, track) {        var score = feature._parent.get('score');                    var opacity = 0;            if(score == 0.0) {{                opacity = 1;            }} else {{                opacity = (20 - Math.log10(score)) / 180;            }}  return 'rgba(227, 26, 28, ' + opacity + ')';    }    ",
            "className" : "feature"
         },
         "compress" : 0,
         "storeClass" : "JBrowse/Store/SeqFeature/NCList",
         "trackType" : "JBrowse/View/Track/CanvasFeatures",
         "category" : "Blast / Protein",
         "label" : "7546be86a2de96546f3df84dbfb49bb4_0"
      }

Tarball of data directory: https://cpt.tamu.edu/dot/blast-color-issue.tar.bz2

Is there any way we can just... completely disable Apollo styling on our own tracks? Especially for blast results, where the old "single-line-through-the-hit" was very clear. The new utvalg_059 has people asking us questions they didn't before, misunderstanding how we're rendering the evidence.

nathandunn commented 7 years ago

@erasche You can disable the definitely neat plugin(s), which shouldn't be on by default. The up versus down is just strand info, but it may interfere with other stuff. I added "Neat" plugins to master (though they are not in 2.0.5 I think).

In you go into the apollo-config.groovy file you would comment out this section:

https://github.com/GMOD/Apollo/blob/master/grails-app/conf/Config.groovy#L406-L412

You may want / need to make sure if you do a clean-all that the plugins aren't included.

I updated the JBrowse version as well, but we shouldn't be forcing anything out, though I noticed there were some fixes to Canvas in there (hopefully those are still working).

nathandunn commented 7 years ago

@erasche If its still over-writing the colors even after you've removed the Neat Plugins, let me know. I'm not seeing those blues / blacks that you are off of master.

hexylena commented 7 years ago

Rebuilding my apollo image now, thanks for the tip. That sounds like it's exactly what I need. I haven't made the update to 2.0.5 yet, hopefully will get to that in january.

hexylena commented 7 years ago

That change was introduced in https://github.com/GMOD/Apollo/commit/17558740, looks like I haven't checked my apollo-config.groovy against the reference in a long time. Thanks!

hexylena commented 7 years ago

Yep, confirmed. Thank you!