define the coordinates in model exported as sbgn
evescat opened this issue · 1 comments
Model exported as sbgn from newt here: coords-check.sbgn.zip
I would like to ask how do you draw the end of a reaction (arc) that it is displayed as attached to an element (process or macromolecule). As in the code it states that there is gap between start/end of arc and the element is it attached.
Please see coordiantes of arcs/elements from the attached model:
- catalysis end arc is y="314.2858246181238", while process y="317.85714285714283".
There is ~3.5 gap. Is 3.5 the diameter/radius of the circle? - Similar 'gap' is between consumption (arc start x="410.625") and macromolecule A (x="410"="350+60")
- macromolecule B (x="655") and production end x="651.25" - the difference 3.75 is the height of the triangle (arrow)?
Please advise how do you define start/end of arc so the ends of arc (with arrow/circle) are directly attached to the element despite the "gap".
coordinates of my sbgn model:
<arc id="nwtE_4b270659-8f87-40fd-9c3a-eb003a4ad40f" class="catalysis" source="nwtN_c4567535-9e75-4651-af6f-1497f6e4fba6" target="nwtN_5262634d-7e4f-43f4-b1db-9f60f9d019ec">
<start x="520.8686974789916" y="221.625"/>
<end x="520.0900350872427" y="314.2858246181238"/>
</arc>
<glyph id="nwtN_5262634d-7e4f-43f4-b1db-9f60f9d019ec" class="process">
<bbox x="512.8571428571429" y="317.85714285714283" w="14.285714285714286" h="14.285714285714286"/>
</glyph>
<arc id="nwtE_fdcd6b0d-b901-491f-bdba-e780e3a9b297" class="consumption" source="nwtN_958fbeaa-02bf-478c-986c-79542a6754c8" target="nwtN_5262634d-7e4f-43f4-b1db-9f60f9d019ec.1">
<start x="410.625" y="325"/>
<end x="509.375" y="325"/>
</arc>
<glyph id="nwtN_958fbeaa-02bf-478c-986c-79542a6754c8" class="macromolecule">
<label text="A"/>
<bbox x="350" y="310" w="60" h="30"/>
</glyph>
<glyph id="nwtN_f07db238-a4df-400a-8c48-9bd5f27f7288" class="macromolecule">
<label text="B"/>
<bbox x="655" y="310" w="60" h="30"/>
</glyph>
<arc id="nwtE_2d6b8b85-55a9-47e6-b7af-a505471b4615" class="production" source="nwtN_5262634d-7e4f-43f4-b1db-9f60f9d019ec.2" target="nwtN_f07db238-a4df-400a-8c48-9bd5f27f7288">
<start x="530.625" y="325"/>
<end x="651.25" y="325"/>
</arc>
There exists a similar issue here. Probably, there are bugs on exporting the end points of some edge types. I am not sure whether there exists a specific pattern for the gap values, this needs further investigation.