Murali-group / CyGraphSpace

A GraphSpace app for Cytoscape
GNU General Public License v3.0
1 stars 2 forks source link

Missing styles after uploading to GraphSpace #13

Open LHuang2019 opened 6 years ago

LHuang2019 commented 6 years ago
  1. The issue is found by exporting the network generated by PathLinker to GraphSpace. The result graph does not apply the correct background color (yellow/light-blue in this case) mapping for the source and the target nodes. The CyGraphSpace code base on master branch does export the style correctly. The issue only exists with the code base in the develop branch.

  2. Both master and develop branch fails to apply the hierarchical layout to the PathLinker network.

image

The above pictures comes from the CyGraphSpace develop branch. Both the color and the hierarchical layout are missing for the result PathLinker network.

jlaw9 commented 6 years ago

There seem to be other styles that don't seem to match correctly. I tried uploading the yeast "galFiltered.sif" graph, and the node sizes are not set correctly (see below).

I think it would be useful to make a check-list of styles to make sure they all work. We could make a cytoscape graph with each of those styles to easily check if they stay the same when uploaded to GraphSpace.

screenshot from 2018-03-07 16-13-03 screenshot from 2018-03-07 16-13-40

adbharadwaj commented 6 years ago

@jlaw9 @LHuang2019 Can you share the network file (cyjs file) and style file (json) here? Is this issue happening when we upload the exported file separately?

LHuang2019 commented 6 years ago

The issue does not happen when we upload the network manually for the first example.

Right now the colors of source and target nodes has been correctly mapped. But the network layout is still not correctly mapped.

Network uploaded manually: image

Network uploaded using CyGraphSpace: image

jlaw9 commented 6 years ago

Looks like the node positions are maintained, but the node size still isn't correct image image

LHuang2019 commented 6 years ago

The issue is similar to String network mapping problem. The node size is done with a special mapping in Cytoscape.

The real issue is the fact that Cytoscape exporter does not export the mapping. Therefore even if you upload the network manually from the GraphSpace website, the node size will still be incorrect. To fix this issue in CyGraphSpace, we will need to hard code the mapping which is inefficient and it will only work for this specific type of network.

The solution is to fix the Cytoscape exporter, this issue should be reported to Cytoscape.

jlaw9 commented 6 years ago

You're right @LHuang2019. Just found that this is a known issue in cytoscape's complete list of compatibilities spreadsheet. I think there is a possible workaround here if the user unlocks the node/width height and then sets a mapper to the node degree themselves.

Another possible option would be to detect these types of bypasses, figure out what the actual style values are (node width and height in this case) and set them explicitly in the JSON being exported. Not sure if that would be possible though...

jlaw9 commented 6 years ago

One more related issue is the graph's background color, which needs to be set in the CSS of the website. This is already an issue on GraphSpace: https://github.com/Murali-group/GraphSpace/issues/291

Once that issue is fixed, it should be simple to add the JSON field that would be recognized by GraphSpace.