VEuPathDB / plot.data

1 stars 0 forks source link

Network layouts handle negative values #260

Open asizemore opened 5 months ago

asizemore commented 5 months ago

I did some looking and folks don't seem to be happy with how the force-directed layouts in igraph handle negative weights. Often the examples i saw only had a few nodes, so i think we should see how it goes with our networks and modify if needed.

If we do need to modify, one fun idea would be to have options for force-directed: positive only, negative only, both, or absolute value. Basically ways to keep all the edge weights on one side of 0 (except the "both" option). Kathryn was talking about how she's actually only interested in negative edges for the wgcna stuff, which led me to think about this plan.

szhorvat commented 5 months ago

I don't think any of the layout methods in igraph support negative weights. If they don't show an error when you pass a negative weights, that is likely a bug that we should fix.

If you want to discuss why a specific layout does not support negative weights, and whether support would make sense, you can post on https://igraph.discourse.group/ or ping me here.

If you find that igraph accepts negative weights, but shouldn't (e.g. produces bad output), please open an issue in the igraph repo.

asizemore commented 5 months ago

Thank you @szhorvat for the information! I'll do some more thinking on this topic and will be sure to reach out if I have any questions!