PathwayCommons / cytoscape-sbgn-stylesheet

View biological networks via Cytoscape.js and sbgn-ml
MIT License
60 stars 30 forks source link

Consistent node sizing scheme #21

Closed d2fong closed 7 years ago

d2fong commented 7 years ago

When tinkering/refactoring the stylesheet. I noticed that the size of sbgn nodes are not consistent. A simple chemical in one graph is not the same size as a simple chemical in another.

It is possible that there could be some scheme that can approximate good looking graphs in the general case using the min-width/height properties.

d2fong commented 7 years ago

For example, I notice that simple chemicals can be 60x60, 40x40, 36x40 width/height depending on the sbgnml file.

@IgorRodchenkov is there any reason for this? I assume that some backend java library is computing these width/height values and then spitting them into the sbgnml?

d2fong commented 7 years ago

@IgorRodchenkov Here is an example:

      <glyph id="http___www.reactome.org_biopax_48887SmallMolecule18http___www.reactome.org_biopax_48887BiochemicalReaction2195LEFT_TO_RIGHT" class="simple chemical" compartmentRef="nucleoplasm">
         <label text="ATP" />
         <bbox y="399.78652908166936" x="600.8036470146063" w="36" h="40" />
         <clone />
      </glyph>
IgorRodchenkov commented 7 years ago

It's github.com/BioPAX/Paxtools sbgn-converter module. You can create an issue there about this, mention @ozgunbabur, @metin... @istemi.. etc folks

On Feb 22, 2017, at 3:37 PM, Dylan notifications@github.com wrote:

@IgorRodchenkov Here is an example:

  <glyph id="http___www.reactome.org_biopax_48887SmallMolecule18http___www.reactome.org_biopax_48887BiochemicalReaction2195LEFT_TO_RIGHT" class="simple chemical" compartmentRef="nucleoplasm">
     <label text="ATP" />
     <bbox y="399.78652908166936" x="600.8036470146063" w="36" h="40" />
     <clone />
  </glyph>

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

ugurdogrusoz commented 7 years ago

I agree the inconsistency in node dimensions should be fixed. @ozgunbabur why do you think this is happening (if it's really coming from paxtools)?

IgorRodchenkov commented 7 years ago

it's perhaps coming from a paxtools dependency, such as Chilay...

On Feb 22, 2017, at 3:37 PM, Dylan notifications@github.com wrote:

@IgorRodchenkov Here is an example:

  <glyph id="http___www.reactome.org_biopax_48887SmallMolecule18http___www.reactome.org_biopax_48887BiochemicalReaction2195LEFT_TO_RIGHT" class="simple chemical" compartmentRef="nucleoplasm">
     <label text="ATP" />
     <bbox y="399.78652908166936" x="600.8036470146063" w="36" h="40" />
     <clone />
  </glyph>

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

ugurdogrusoz commented 7 years ago

no chilay takes dimensions as input, doesn't assign dimensions @IgorRodchenkov

IgorRodchenkov commented 7 years ago

Well, Paxtools sbgn-converter (biopax to sbgn-ml) uses chilay-sbgn, etc., does layout and stores coordinates in the sbgn-ml data, which then initially used by our sbgnviz related js tools... May I'm wrong in that these coordinates is a different matter from what this issue is about...

On Feb 23, 2017, at 6:36 AM, ugurdogrusoz notifications@github.com wrote:

no chilay takes dimensions as input, doesn't assign dimensions @IgorRodchenkov

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

IgorRodchenkov commented 7 years ago

Paxtools has, e.g., these:

https://github.com/BioPAX/Paxtools/blob/master/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/L3ToSBGNPDConverter.java#L333 https://github.com/BioPAX/Paxtools/blob/master/sbgn-converter/src/main/java/org/biopax/paxtools/io/sbgn/SBGNLayoutManager.java#L40

Pathway Commons (PC2 web service, cPath2 software) calls L3ToSBGNPDConverter, and the default setting is that it called SBGNLayoutManager to aply cose layout... The result SBGN-ML file the then served and, you know, used by our javascript apps and libraries, such as SBGNViz.

Please, hey sbgn-converter developers, review and fix if required (including in chilay-sbgn and libsbgn, and deploy those properly to Central Maven or OSSRH at least...) This is important for Pathway Commons and SBGN projects, no?

On Thu, Feb 23, 2017 at 7:13 AM, Igor R rodche@gmail.com wrote:

Well, Paxtools sbgn-converter (biopax to sbgn-ml) uses chilay-sbgn, etc., does layout and stores coordinates in the sbgn-ml data, which then initially used by our sbgnviz related js tools... May I'm wrong in that these coordinates is a different matter from what this issue is about...

On Feb 23, 2017, at 6:36 AM, ugurdogrusoz notifications@github.com wrote:

no chilay takes dimensions as input, doesn't assign dimensions @IgorRodchenkov https://github.com/IgorRodchenkov

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PathwayCommons/sbgn-renderer/issues/21#issuecomment-281969326, or mute the thread https://github.com/notifications/unsubscribe-auth/AA8fwbxi1e3WCaU2EfiCZhjjDCISW-ypks5rfW9OgaJpZM4MDMNw .