torchcell.datamodels.ontology_checks.PhenotypeLabelMap

class PhenotypeLabelMap(*, matched: dict[str, str] = <factory>, ambiguous: dict[str, list[str]] = <factory>, unmatched_labels: list[str] = <factory>, unmapped_classes: list[str] = <factory>)[source]

Bases: BaseModel

Bijection between concrete phenotype classes and phenotype node classes.

The mapping is derived from DATA, not from a naming convention: a node class’s non-envelope properties must be field names of exactly one concrete phenotype. That is why RNASeqExpressionPhenotype <-> rnaseq expression phenotype and CalMorphPhenotype <-> calmorph phenotype resolve without a hand alias table, and why a property drifting off its class is caught.

model_config: ClassVar[ConfigDict] = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

property is_bijective: bool

True when every class has exactly one node class and vice versa.