marbl/MetagenomeScope

Support general node / edge metadata

fedarko opened this issue · 0 comments

Arbitrary categorical / quantitative information associated with each node / edge. Something simple like TSV files would be sufficient. Maybe we have two optional parameters to the CLI (--node-metadata and --edge-metadata?), where each can refer to a TSV file where the rows are nodes / edges and the columns are metadata fields (e.g. TaxonomicClassification, Repetitive, ...)

The main purposes behind supporting this are:

  1. Enabling the user to encode the visualization with this information -- i.e. node / edge colors, or edge thicknesses, or maybe node border colors (?), etc.

  2. When we view information about a node / edge, show this information (along with existing node / edge properties, e.g. length, GC content, ...)

This information should probably just be stored in the same location as arbitrary GFA tag information (#238). We will need to do the standard sanity checking of "is the same metadata field name given in both files?", of course.

Support for this issue would supersede #8, #54, and #95. It isn't quite a replacement for #111, but I guess we could extend it to support #111 (I'll leave both this and #111 open for now).

Checklist

Python

  • Load node metadata; add it to graph, and then to visualization
  • Load edge metadata; add it to graph, and then to visualization
  • Check that metadata columns are not duplicated with other reserved names / etc.

JS

  • Implement arbitrary node coloring
    • Categorical
    • Quantitative
  • Implement arbitrary node border coloring
    • Categorical
    • Quantitative
    • Think really hard about if we want to support scaling node border thicknesses (mildly hot take: probably not)
  • Implement arbitrary edge coloring
    • Categorical
    • Quantitative
  • Implement arbitrary edge thickness scaling
    • Quantitative (there isn't a categorical analogue for this, right?)
    • Once this is ready, remove the Python scale_edges() stuff in favor of just letting the user scale edges by coverages in the JS (maaaaybe default to that, so that the default "workflow" for a user doesn't change)