iVis-at-Bilkent/newt

state variables glyphs are not loaded properly from SBGN-ML when their state sub-element is prefixed

Closed this issue · 3 comments

State variables are not loaded properly from SBGN-ML when the element inside the state variable element is prefixed (e.g., sbgn:state). The state variable is represented but it has no text inside (the value and variable inside the element are not taken into account). Here is a minimal SBGN-ML file to reproduce the issue:

<sbgn:sbgn xmlns:sbgn="http://sbgn.org/libsbgn/0.3">
<sbgn:map id="my_map_id" language="process description">
<sbgn:bbox h="1935.0" w="2019.0" x="0.0" y="0.0"/>
<sbgn:glyph class="macromolecule" id="sa142">
<sbgn:label text="s136">
<sbgn:bbox h="40.0" w="80.0" x="179.0" y="878.0"/>
</sbgn:label>
<sbgn:bbox h="40.0" w="80.0" x="179.0" y="878.0"/>
<sbgn:glyph class="state variable" id="sa142-rs1">
<sbgn:state value="val" variable="var"/>
<sbgn:bbox h="15.0" w="15.0" x="171.5" y="890.5"/>
</sbgn:glyph>
</sbgn:glyph>
</sbgn:map>
</sbgn:sbgn>

I tracked this down. It is because of a typo in libsbgn.js. See this. It is currently sate instead of state. I have opened a PR that resolves this issue.

@hasanbalci can we make sure this is used by Newt deployments

I merged the PR by @umut-er. The fix is currently available in the dev version: http://newt.cs.bilkent.edu.tr/.