tcameronwaller / dymetabonet

early prototype of a web application for visual exploration of metabolic networks
GNU General Public License v3.0
0 stars 0 forks source link

represent reactions visually in node-link diagram #48

Closed tcameronwaller closed 7 years ago

tcameronwaller commented 7 years ago

Options:

  1. Represent metabolites and reactions as distinct types of nodes with directional links between them.
  2. Represent metabolites as nodes and reactions as orientable, directional links between them. Non-directional, metabolite-type links (represent faint gray) join metabolites to in- or out-nodes for a reaction. Directional, reaction-type links join in- and out-nodes for the reaction and include the reaction's attributes. There are advantages and disadvantages to both representations. Representation 1 provides distinct nodes for metabolites and reaction. User interaction with these nodes is intuitive, and these nodes can represent attributes by size and color. It is also more dense and compact for larger networks. Representation 2 is visually simple, less dense, and easy to trace reaction directionality. This representation is fairly intuitive for biologists.

Consider supporting both representations. In either case, I could simplify the concept of path lengths in topological traversals by considering counts of reactions between metabolites, not counts of links. For both representations, the count of links is greater than the count of reactions, but this discrepancy is an artifact of the representation.

tcameronwaller commented 7 years ago

Options:

  1. Represent metabolites as circular nodes with links emanating in any direction. Center and fit labels on top of these nodes. Represent reactions as oblong nodes (ellipses or rectangles). Force these reaction nodes to maintain a horizontal orientation, and center labels on top. Links from reactant metabolites join reaction nodes on one end, and links from product metabolites join reaction nodes on the opposite end. The reaction node should indicate directionality, and this should vary to optimize layout.

A challenge with this option is that I do not know how to determine which end of the reaction node to use for reactants and which to use for products. I do not know how I would do that effectively without having separate nodes for either end as in option 2.

tcameronwaller commented 7 years ago

If I do anything fancy like Option 3, then I will probably need to use key functions to assign identifiers to node's elements. If I have separate nodes for reaction layout and reaction nodes to sit on top, then simple indices will not be sufficient.