Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cytoscape as the Galaxy charts plugin #3817

Merged
merged 21 commits into from Mar 28, 2017

Conversation

Projects
None yet
7 participants
@anuprulez
Copy link
Member

commented Mar 26, 2017

Introduction:

This PR integrates interactive graph visualizations adapted from the Cytoscape as part of the Galaxy charts visualization. The Cytoscape is equipped with capabilities for the visualization and analysis of complex data based on Graph theory. The features like graph search algorithms, graph querying, set theory operations and compatibility with all modern browsers, jQuery, Node.js, Require.js and the R language (via RCyjs) make it a powerful library.

First look:

look

Following from it, this PR includes:

  • Graph search algorithms
  • Graph traversal techniques
  • Numerous layouts of graphs
  • Multiple edge types
  • Colors for animated edges and nodes and Zoom

Depth First Search

dfs

A* Search:

astar

Predecessors:

predecessors

Usage tips:

  • For animated Breadth First Search and Depth First Search one should click/ tap on a node (which become the root node). For Graph traversal techniques like Successors, Incomers etc. one node should be clicked.
  • For animated A*, one should click on two nodes, one for the root and another for the destination.

Data format:

The version of Cytoscape built for working with browsers supports input data as JSON which contains information about nodes and edges of the graph. So, data formats like Simple Interaction File (SIF) should be converted to JSON for the visualization to be included into the Galaxy. Hence, this PR includes a file format converter from SIF to JSON. The specification of a SIF file has been taken from here.
Right now, the plugin supports only SIF and JSON files. Moving forward, to extend the support for different kinds of files like GML and XGMML, converters to JSON can be written for these file formats too.

Example of a SIF file:

nodeA relationship_type nodeB
nodeC relationship_type nodeA
nodeD relationship_type nodeE nodeF nodeB
nodeG
...
nodeY relationship_type nodeZ

Or

node1 typeA node2
node2 typeB node3 node4 node5
node0

Citation:

Cytoscape.js: a graph theory library for visualization and analysis
Franz M, Lopes CT, Huck G, Dong Y, Sumer O, Bader GD
Bioinformatics (2016) 32 (2): 309-311 first published online September 28, 2015 doi:10.1093/bioinformatics/btv557

Note:

It overwrites and enhances the previously present basic Cytoscape viewer as charts plugin.

Credits:

Thanks a lot to Björn Grüning (@bgruening) for his support and review.

All suggestions are welcome. Thanks a lot!

@bgruening

This comment has been minimized.

Copy link
Member

commented Mar 26, 2017

Thanks @anuprulez! Nice work.
@nekrut this can be used for teaching as well!

@galaxybot galaxybot added the triage label Mar 26, 2017

@galaxybot galaxybot added this to the 17.05 milestone Mar 26, 2017

@guerler

This comment has been minimized.

Copy link
Contributor

commented Mar 26, 2017

This is really nice. I have minor suggestions. 1. Can we use the color selector instead of the RGB-sliders. 2. min-Zoom should probably be either 0, or stop zooming once all nodes are within the boundaries of the frame. Max-zoom should be set to a large number or such that at least one node is shown. Then we do not need those slider options in customization form either. 3. Finally, we should update the thumbnail/icon of this visualization type.

@nekrut

This comment has been minimized.

Copy link
Contributor

commented Mar 27, 2017

incredible! once this is merged let cytoscape people know

anuprulez added some commits Mar 27, 2017

Fixing review comments- removing sliders for colors and zoom and addi…
…ng color pickers, updating values for min and max zoom and replacing logo of the plugin
@anuprulez

This comment has been minimized.

Copy link
Member Author

commented Mar 27, 2017

@guerler Thanks for your review! I have updated the repository with the following changes:

  1. Added color pickers for nodes, edges and highlighted edges and nodes (for search algorithms and traversals) and removed the RGB sliders.

  2. Removed the zoom sliders too and fixed the values of minZoom as 0.1 (and not 0 because the graph becomes invisible) and maxZoom as 20 (one node and its label fits in the viewport).

  3. Updated the icon of the plugin.

@guerler guerler merged commit cfd8ec7 into galaxyproject:dev Mar 28, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@anuprulez anuprulez deleted the bgruening:cytoscape branch Mar 28, 2017

@martenson

This comment has been minimized.

Copy link
Member

commented Mar 28, 2017

Well done, thanks for the flow of contributions @anuprulez ! 🎉

@anuprulez

This comment has been minimized.

Copy link
Member Author

commented Mar 28, 2017

@martenson Thanks a lot!

@shenweiyan

This comment has been minimized.

Copy link
Contributor

commented Jul 18, 2017

It is really a nice job. And if there are some SIF and JSON files for testing, it will be perfect.

@bgruening

This comment has been minimized.

Copy link
Member

commented Jul 18, 2017

Maybe we should add some example data to the plugin, this could be used later for automatic testing.
@guerler opinions?

@guerler

This comment has been minimized.

Copy link
Contributor

commented Jul 18, 2017

Sounds good, I think the goal should be to integrate this into our unified vis framework.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.