In cytoscape.js, by default, nodes are connected by edges that consider the shortest distance between the center and the center, and if they go through other points along the way, like the taxi mentioned above, the points are not specified and are calculated algorithmically.
The problem with allowing intermediate points to be specified is that when there are multiple edges between nodes, like in the bezier and haystack examples, it is annoying to have to specify intermediate points for all of them.
In the previous example, there are only three edges, so it’s not a big deal, but in the case of genomic networks, which I studied in graduate school, a single gene often interacts with dozens or hundreds of other genes, so it’s a big deal.
In the worst case scenario, the edges overlap and missing a few edges can cause the graph to produce completely different information.
In other words, in the problem of connecting to one long node, the long node is only a graphical (width
) perspective for the user,
But from the computer’s point of view, it is irrational behavior to connect an edge to a node that doesn’t even exist, as shown in the image below, so there is no reason to consider this option in the first place.
To solve this problem, I created a micro node and modified it to connect to the appropriate part, just like the previous edge midpoint problem.
Here is a partial view of the graph I ended up creating in R. (Again, groups and numbers are arbitrarily modified)