Giter VIP home page Giter VIP logo

Comments (5)

ugurdogrusoz avatar ugurdogrusoz commented on August 15, 2024

The short answer is no. Spring embedders including cose-bilkent do apply repulsion forces on nodes to avoid overlaps and put some minimal distance between nodes. I can't see the whole picture in your example but the reason that some nodes (AND, OR, ProteinCoding, and HCP) are not nicely distanced from each other might be cause your graph is very dense and the algorithm cannot satisfy all the constraints.

from cytoscape.js-cose-bilkent.

maxkfranz avatar maxkfranz commented on August 15, 2024

@superbobry If your data is a DAG/tree -- which logical AND / OR statements usually are -- you can also try the Dagre layout. Dagre is designed just for DAGs.

When using CoSE, you may have to alter the options for the force values to get a nice result. What values work well can be very different for different graphs, so you usually have to experiment a bit.

from cytoscape.js-cose-bilkent.

superbobry avatar superbobry commented on August 15, 2024

@ugurdogrusoz, @maxkfranz thank you very much for the explanation. I will give Dagre a try.

from cytoscape.js-cose-bilkent.

AllanDickerman avatar AllanDickerman commented on August 15, 2024

Do you know of a layout where I specify measured distances between nodes (edge lengths)
and the layout tries to place nodes so as to minimize distortions to the specified edge lengths?
One application is where nodes are genes and distances are measured (DNA sequence or perhaps recombination probability).
I want a map that tries to reconcile the measured distances with minimal distortion.

from cytoscape.js-cose-bilkent.

maxkfranz avatar maxkfranz commented on August 15, 2024

Do you know of a layout where I specify measured distances between nodes (edge lengths)
and the layout tries to place nodes so as to minimize distortions to the specified edge lengths?
One application is where nodes are genes and distances are measured (DNA sequence or perhaps recombination probability).
I want a map that tries to reconcile the measured distances with minimal distortion.

@AllanDickerman

Layouts like FCOSE and Cola allow for this. Simply set the values affecting edge length appropriately (e.g. idealEdgeLength and edgeElasticity in FCOSE). The Cola demo sets edge length proportional to the inverse of weight (i.e. closer nodes tend to be more related). GeneMANIA does the same thing with COSE.

N.b. if you overconstrain the system (e.g. with a large, dense network), then the lengths won't correspond well to your metric.

from cytoscape.js-cose-bilkent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.