SuLab / WikiGenomesBase

A configurable codebase for launching organism specific WikiGenomes spinoff applications (e.g. ChlamBase.org) This is a web application framework for creating a model organism database leveraging the taxonomic, genetic and functional data that has been loaded to Wikidata.org by the Gene Wiki Project.
https://chlambase.org/
MIT License
7 stars 4 forks source link

image coloring in image visualizer blow up sometimes does not work #216

Open andrewsu opened 5 years ago

andrewsu commented 5 years ago

For example, the thumbnail visualizer for https://chlambase.org/organism/471472/gene/CTL0370 correctly shows localization to the cell membrane and inclusion body membrane:

2019-03-12_16-25-52

But the full sized viewer shows no coloring.

2019-03-12_16-27-01

In contrast, both the thumbnail and full-sized views show up fine for https://chlambase.org/organism/471472/gene/CTL0050 (which localizes to EB and RB).

djow2019 commented 5 years ago

I am not sure what the exact reason is, but I did notice that this bug occurs for all genes with "host cell membrane" as a cc (you can verify this with the advanced search). However, all the other components work (EB. RB, host cell lipid droplets, etc.). The only thing I can think of is that the color of the membranes is done using the "stroke" attribute, whereas the other structures are colored with "fill". If that is indeed the case, then the library that we are using that enhances the image seems to have conflicts with setting the stroke.

Another idea might be that the enlarged image has a different xml structure than the smaller one, so the same paths/attributes might not exist.

Referenced lines: https://github.com/SuLab/WikiGenomesBase/blob/master/wiki/static/wiki/js/app/main-page/gene-overview/cell-visualizer-view/cell-visualizer-view.component.js#L82-L102