From: Colin <col...@gm...> - 2018-09-30 14:33:44
|
I think there is nothing inherently wrong with the attribute name"snp.effect" You might try console.log the output of feature.get('snv.effect') and see if it helps clarify anything but in my test it seems that it is fine for an attribute to have this in column 9 of a gff (both gff3tabix and flatfile-to-json) Note that sometimes the color callback is called in children or parent features and then you might have to use feature.parent() or feature.children() and iterate over these -Colin On Fri, Sep 28, 2018 at 6:55 PM Sofia Robb <so...@so...> wrote: > Hello All, > > I am trying to write a function to color my glyph based on a value from > one of my 9th column attributes. I can't figure out how to retrieve it. > > All my glyphs are blue with this > > "color" : "function(feature) {return feature.get('snv.effect')=='strong' > ? 'green' : 'blue'}" > > > but if i change it to Source it works. > > "color" : "function(feature) {return feature.get('Source')=='strong' ? > 'green' : 'blue'}" > > > Thanks! > Sofia > > > _______________________________________________ > Gmod-ajax mailing list > Gmo...@li... > https://lists.sourceforge.net/lists/listinfo/gmod-ajax > |