iVis-at-Bilkent / syblars

SyBLaRS: Systems Biology Layout & Rendering Service
MIT License
12 stars 1 forks source link

Reformating SBGN File Layout and Exporting in Original Format Instead of JSON or PNG #18

Open nvelden opened 1 year ago

nvelden commented 1 year ago

Can Syblars be used to adjust the layout of an SBGN (Systems Biology Graphical Notation) file? Let's consider an SBGN file where all x and y coordinates within <bbox> are set to zero.

Is it possible to upload this SBGN file, apply the necessary formatting to correct the coordinates, and then download the modified file again in its original SBGN format, as opposed to JSON or PNG?

Protein_07baa03732f819e00196379af35014de" compartmentRef="nucleoplasm">
            <label text="GATA4"/>
            <bbox w="48.0" h="30.0" x="0.0" y="0.0"/>
            <glyph class="state variable">
                <state value="x[1 - 442]"/>
                <bbox w="35.0" h="10.0" x="0.0" y="0.0"/>
            </glyph>
        </glyph>
        <glyph class="nucleic acid feature" id="http://pathwaycommons.org/pc12/Dna_f275b5a7a71358d28befca183981db08" compartmentRef="nucleoplasm">
            <label text="GIP"/>
            <bbox w="50.0" h="30.0" x="0.0" y="0.0"/>
            <glyph class="unit of information">
                <label text="mt:DNA"/>
                <bbox w="35.0" h="10.0" x="0.0" y="0.0"/>
            </glyph>
        </glyph>
hasanbalci commented 1 year ago

Currently, Syblars doesn't support updating the layout information in SBGNML file. It's one of the future works. For now, you can programmatically set node positions in SBGN file by using the JSON output. If you need this feature only for a few SBGN files, you can also use Newt Editor by just loading the file, applying a layout and then saving it again in SBGN format.