VEuPathDB / plot.data

1 stars 0 forks source link

Bipartite Network: Ordering nodes #252

Open asizemore opened 6 months ago

asizemore commented 6 months ago

From the mbio live site, 02/26/24

Screen Shot 2024-02-26 at 12 56 45 PM

The nodes are sorted in no reasonable order.

The most obvious sort order would be alphabetical, though i know we've talked about hierarchical sorting based on taxonomy. But for the near future, i think it makes most sense to have sort options:

  1. Alphabetical
  2. Number of connections (unweighted degree)
  3. Custom. Either this will just be a separate radio button or we'll somehow otherwise handle the user reordering the nodes however they want.

My question is, who should do this reordering work? I'm thinking plot.data right now, since we're also including degree in the ordering. @d-callan may have ideas here

d-callan commented 6 months ago

I'm happy to have the backend do it

asizemore commented 6 months ago

Note we're gonna want to order alphabetically based on the display name, not the label id. Maybe Node also needs a displayLabel slot. Then we could have a Partition method that orders nodes within a partition? Or have it be part of the constructor? One open question is how to handle a user reordering nodes in a custom way. If i move a bunch of nodes around and ask to reorder alphabetically, can i go back to my custom order that i made previously?