-
Notifications
You must be signed in to change notification settings - Fork 0
Description
When there is a bidirectional edge in a cell_state_graph, there can be some strange placements of nodes. For example, in the below plot, the node labeled "retina, gabaergic amacrine" is placed above "retinal neuron precursor" because of the bidirectional edge:

In reality, it would be better for the gabaergic amacrine node to be placed below the neuron precursor node. This is what happens when I plot the state graph using the old function plot_cell_state_annotations():

The difference is likely because plot_cell_state_annotations() draws two directed edges while new_cell_state_graph() draws a single undirected edge, which changes how the graph layout is set.
It would be nice if the user can specify what level certain nodes should be placed on so they can force the graph layout to be a certain way, e.g.:
tribble(
~cell_state, ~layer,
"retinal neuron precursor", 3,
"retina, gabaergic amacrine", 4
)A similar method (which might be better) is to require that all leaf nodes are drawn in a single row at the bottom, root nodes drawn at the top, and then let the layout algorithm figure out where to put the rest of the nodes given those constraints.