torchcell.datamodels.schema.Phenotype
- class Phenotype(*, provenance_gaps: list[~torchcell.verification.sourced.ProvenanceGap] = <factory>, graph_level: str, label_name: str, label_statistic_name: str | None = None)[source]
Bases:
ProvenanceGapMixinBase phenotype describing an observed label and its graph level.
Inherits
provenance_gaps(+ its two honesty validators) fromProvenanceGapMixin– a phenotype field the source does not carry (n_samples, an uncertainty) is a typed absence, shared withEnvironment.- validate_fields() Phenotype[source]
Validate that graph_level is one of the supported graph levels.
- validate_label_fields() Phenotype[source]
label_name / label_statistic_name must name fields on the concrete class.
Inherited by every Phenotype subclass (replaces the formerly identical per-subclass copies).
type(self).__annotations__is the concrete subclass’s own field set, so each subclass is checked against its own declared fields.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].