torchcell.paper.tables.phenotype_descriptor
- phenotype_descriptor(record: dict[str, Any]) tuple[str, str][source]
Derive
(shape, graph_role)for one record from its stored instance.shapeis the shape of a SINGLE phenotype instance:scalarorvector (D)(a length-1 vector is a scalar).graph_roleis where the label sits in the cell graph:global/node/bipartite node(fromgraph_level), or – for a gene interaction –edgewhen it relates two gene nodes andhyperedgewhen it relates three or more, derived from the number of perturbations (so a digenic interaction readsedgeand a trigenic onehyperedge, regardless of the storedgraph_level). Everything is read from the record, never hand-authored.