SBGN-ML downloaded from pathway commons web page doesn't have coordinates

26 views
Skip to first unread message

dong xiaoxi

unread,
Jan 19, 2019, 11:13:36 PM1/19/19
to pathway-commons-help
I find the pathway layout in Pathway Commons web page looks pretty good. For example this one, http://apps.pathwaycommons.org/pathways?uri=http%3A%2F%2Fidentifiers.org%2Fpanther.pathway%2FP00001
But when I downloaded the SBGN-ML file from this web page, there is no coordinated for the nodes (x and y are all 0).
Is there any way to get the layout information so users can further modify the SBGN-ML files based on the current layout? 
I also found that when you open the same link using different web browsers such as Chrome (left) and Firefox(right), the layout is different (I think the Firefox version is better). 
How did this work? Thank you!

chrome.Adrenaline and noradrenaline biosynthesis.pngfirefox.Adrenaline and noradrenaline biosynthesis.png


Igo R

unread,
Jan 20, 2019, 4:30:25 PM1/20/19
to pathway-co...@googlegroups.com
The layout is performed after the BioPAX model gets converted to SBGN and then to the Cytoscape.js (JSON) model which the layout is applied to.
So, it does not affect the original SBGN-ML XML. A.f.a.i.k., the layout is very fast, applied every time one reloads the page, but it's not saved (we experimented with storing and sharing layouts but it did not work very well). However, adding the coordinates back to the original SBGN-ML, which a user downloads, is a good idea.

It's not going to be a quick fix, but we could think about it; so I opened a ticket: PathwayCommons/app-ui#1271.

Cheers,
Igor Rodchenkov

--
You received this message because you are subscribed to the Google Groups "pathway-commons-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pathway-commons-...@googlegroups.com.
To post to this group, send email to pathway-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pathway-commons-help/6c5d669f-d626-460b-9b26-1ee67ec51d24%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeffrey Wong

unread,
Jan 20, 2019, 6:23:55 PM1/20/19
to pathway-co...@googlegroups.com
Just to reiterate, SBGN-ML data returned by our backend (i.e. what the download button returns) is mapped to JSON and layouts applied in-browser. The client-side layout likely underlies browser-specific differences.

Thanks - Jeff

  

On Jan 20, 2019, at 4:29 PM, Igo R <rod...@gmail.com> wrote:

The layout is performed after the BioPAX model gets converted to SBGN and then to the Cytoscape.js (JSON) model which the layout is applied to.
So, it does not affect the original SBGN-ML XML. A.f.a.i.k., the layout is very fast, applied every time one reloads the page, but it's not saved (we experimented with storing and sharing layouts but it did not work very well). However, adding the coordinates back to the original SBGN-ML, which a user downloads, is a good idea.

It's not going to be a quick fix, but we could think about it; so I opened a ticket: PathwayCommons/app-ui#1271.

Cheers,
Igor Rodchenkov

On Sat, Jan 19, 2019 at 11:13 PM dong xiaoxi <dfdong...@gmail.com> wrote:
I find the pathway layout in Pathway Commons web page looks pretty good. For example this one, http://apps.pathwaycommons.org/pathways?uri=http%3A%2F%2Fidentifiers.org%2Fpanther.pathway%2FP00001
But when I downloaded the SBGN-ML file from this web page, there is no coordinated for the nodes (x and y are all 0).
Is there any way to get the layout information so users can further modify the SBGN-ML files based on the current layout? 
I also found that when you open the same link using different web browsers such as Chrome (left) and Firefox(right), the layout is different (I think the Firefox version is better). 
How did this work? Thank you!

<chrome.Adrenaline and noradrenaline biosynthesis.png><firefox.Adrenaline and noradrenaline biosynthesis.png>



-- 
You received this message because you are subscribed to the Google Groups "pathway-commons-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pathway-commons-...@googlegroups.com.
To post to this group, send email to pathway-co...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pathway-commons-help/6c5d669f-d626-460b-9b26-1ee67ec51d24%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups "pathway-commons-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pathway-commons-...@googlegroups.com.
To post to this group, send email to pathway-co...@googlegroups.com.

Augustin Luna

unread,
Jan 30, 2019, 2:46:26 PM1/30/19
to pathway-co...@googlegroups.com, dfdong...@gmail.com, Ugur Dogrusoz
A potential solution. Below is a Groovy script to layout out an SBGN diagram.

Notes:
* Java is used by the Pathway Commons team on the backend.
* Groovy generates bytecode that runs on the Java Virtual Machine; it
is just less verbose:
https://javarevisited.blogspot.com/2016/09/10-basic-differences-between-java-and-groovy-programming.html
* On OSX install Groovy with Homebrew "brew install groovy", Ubuntu
"apt-get update; apt-get -y install groovy2"; other options here:
groovy-lang.org/install.html
* Run script: "groovy sbgn_layout.groovy"
* Dependencies should be automatically retrieved
* Change the inputFile and outputFile names accordingly

Tested from scratch with Docker on Ubuntu 16.04. Attached screenshot
shows before and after. If you try the script below let me know how it
works out. Hope that helps.

Augustin Luna

// SCRIPT BELOW

@GrabResolver(name='biopax', root='http://www.biopax.org/m2repo/releases/')
@Grab(group='org.sbgn', module='libsbgn', version='0.2')
@Grab(group='pathwaycommons', module='chilay-sbgn', version='3.0.0')
@Grab(group='org.biopax.paxtools', module='paxtools-core', version='5.1.0')
@Grab(group='org.biopax.paxtools', module='sbgn-converter', version='5.1.0')

import java.io.*;
import java.util.*;
import org.sbgn.bindings.Sbgn;
import org.biopax.paxtools.io.sbgn.SBGNLayoutManager;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;

String inputFile = "r0.sbgn";
String outputFile = "r1.sbgn"

// Necessary to read in SBGNML file using the libSBGN library
JAXBContext context = JAXBContext.newInstance("org.sbgn.bindings");
Unmarshaller unmarshaller = context.createUnmarshaller();
Marshaller marshaller = context.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);

// Read in file
File sbgnFile = new File(inputFile);
Sbgn result = (Sbgn)unmarshaller.unmarshal(sbgnFile);

// Layout patway
(new SBGNLayoutManager()).createLayout(result, true);

// Save to file
marshaller.marshal(result, new FileOutputStream(outputFile));
> To view this discussion on the web visit https://groups.google.com/d/msgid/pathway-commons-help/2225368C-32C9-48AA-A932-76CBD6EAD5AA%40gmail.com.
Screen Shot 2019-01-30 at 2.07.24 PM.png

dong xiaoxi

unread,
Mar 13, 2019, 11:03:54 AM3/13/19
to pathway-commons-help
Thank you for the answers everyone. 
I have used cytoscape.js-cose-bilkent to generate the layout. As understand pathwayCommons used similar layout right?
>> To unsubscribe from this group and stop receiving emails from it, send an email to pathway-commons-help+unsub...@googlegroups.com.
>> To post to this group, send email to pathway-co...@googlegroups.com.
>> To view this discussion on the web visit https://groups.google.com/d/msgid/pathway-commons-help/6c5d669f-d626-460b-9b26-1ee67ec51d24%40googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "pathway-commons-help" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pathway-commons-help+unsub...@googlegroups.com.
> To post to this group, send email to pathway-co...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pathway-commons-help/CALXvGpbuvoBd1ad2gJb4WnMWeDL%2Bv9OBxkmpYgH4ZP44R%3DoM_A%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google Groups "pathway-commons-help" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pathway-commons-help+unsub...@googlegroups.com.

Niels van der Velden

unread,
Jul 3, 2023, 10:22:41 AM7/3/23
to pathway-commons-help
Is there any update on this? I am trying to download SBGN files from the PathwayCommons website but the x and y coordinates are still 0. Is there any other way to get the files with the correct coordinates?

Augustin Luna

unread,
Jul 5, 2023, 11:09:31 AM7/5/23
to pathway-co...@googlegroups.com
Layout from Pathway Commons sources has always been tricky. It is
necessary to do automated layout; especially, for data sources that
start off as tables of interactions and have no layout to begin with.
Below is a solution that you could try out.

Here is Python code to access a web service from a collaborator that
can do automated layout SBGN. There is example code that interacts
with the Pathway Commons web service that you might be able to modify
for your purpose.

https://gist.github.com/cannin/7e35f3fae274370bd0a70c7b1840c743

SyBLaRS: https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1010635
Code: https://github.com/iVis-at-Bilkent/syblars

Augustin Luna
> To unsubscribe from this group and stop receiving emails from it, send an email to pathway-commons-...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pathway-commons-help/c263bc70-9695-4867-8df8-130ba21a7d9dn%40googlegroups.com.

Niels van der Velden

unread,
Jul 5, 2023, 1:20:22 PM7/5/23
to pathway-co...@googlegroups.com
Thank you so much! Would be great if PathwayCommons would integrate this service to map the x and y coordinates directly when you download the SBGN file from their website.

Op wo 5 jul 2023 om 12:09 schreef Augustin Luna <can...@gmail.com>:
You received this message because you are subscribed to a topic in the Google Groups "pathway-commons-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pathway-commons-help/TIgSwdtql34/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pathway-commons-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pathway-commons-help/CAJ0qwPozeSL1G3Tt%3DbJsW4985R9-ZOa3M0auavsoK9D1YMvEDw%40mail.gmail.com.

Augustin Luna

unread,
Jul 5, 2023, 1:40:14 PM7/5/23
to pathway-co...@googlegroups.com
The service is a bit new (released Nov 2022) and the quality of the
layouts is always a concern before such incorporation. More feedback
from users about the quality of the layouts is appreciated.

Augustin Luna

On Wed, Jul 5, 2023 at 1:20 PM Niels van der Velden
> To view this discussion on the web visit https://groups.google.com/d/msgid/pathway-commons-help/CANBF2awQe%2BT4-62kLthu9WOQdoj7Q3Co4GGtajCaCJ7nD2Xb2w%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages