torchcell.data.SubgraphRepresentation

class SubgraphRepresentation[source]

Bases: GraphProcessor

Processor that removes perturbed genes and returns the induced subgraph.

process(cell_graph: HeteroData, phenotype_info: list[Any], data: list[dict[str, Any]]) → HeteroData[source]

Build the perturbed gene subgraph and attach phenotype labels.