cytoscape / ipycytoscape

A Cytoscape Jupyter widget
https://ipycytoscape.readthedocs.io/en/master/
BSD 3-Clause "New" or "Revised" License
270 stars 62 forks source link

ELK Layout Support #252

Open saulshanabrook opened 3 years ago

saulshanabrook commented 3 years ago

Problem

I would like to be able to use the Cytoscape ELK layout. In the Cytoscape layout blog post, they describe it as:

The elk layout contains several different layout algorithms. The layered and mrtree algorithms are traditional hierarchical layouts. For many trees, the results of elk probably will not differ much from dagre, and dagre has a smaller file size. The results of elk may differ from dagre to a greater degree for complex DAGs. Compare the results of both layouts and see which suits your dataset best.

Proposed Solution

I propose shipping the ELK extension with the bundle. I realize there may be a slippery slope type argument here, if you include one extension, what about the others? But since the Cytoscape extension ecosystem isn't that large, including a few of the most popular and officially supported ones might be a viable option.

Alternatively, you could support some way for others to repackage these extensions and for you to pick them up, but I imagine that might be more work.

Additional context

marimeireles commented 3 years ago

Hey @saulshanabrook, thank you for opening this issue. It's always been the purpose to integrate more layouts to ipycytoscape :) so that's no problem at all! Have you tried this locally? Does a

cytoscape.use(elk);

does the job here? If you've tried this locally, please feel free to open a PR, I'll gladly review it, cheers!