torchcell.datamodels.schema.GeneInteractionPhenotype

class GeneInteractionPhenotype(*, provenance_gaps: list[~torchcell.verification.sourced.ProvenanceGap] = <factory>, graph_level: str = 'hyperedge', label_name: str = 'gene_interaction', label_statistic_name: str = 'gene_interaction_p_value', gene_interaction: float, gene_interaction_p_value: float | None = None, screen_id: str | None = None, n_samples: int | None = None, sample_unit: ~torchcell.datamodels.schema.SampleUnit | None = None, gene_interaction_uncertainty: float | None = None, gene_interaction_uncertainty_type: ~torchcell.datamodels.schema.UncertaintyType | None = None)[source]

Bases: Phenotype, ModelStrict

Phenotype holding a gene interaction score, its p-value and its replicate design.

gene_interaction_p_value is a TEST of the score (the only p-value field in the schema); n_samples + sample_unit + gene_interaction_uncertainty + its type are the replicate/dispersion quartet the other quantitative phenotypes carry (#793), so a sourced replicate design (Babu 2014’s eight colonies per pair) is on the record rather than beside the build. The two absences read differently and are meant to: a gapped p-value is “the source tested the SET, not the pair”, a gapped n_samples is “the source states no replicate design”.

classmethod validate_fitness(v: float) → float[source]

Reject NaN gene interaction values.

classmethod validate_n_samples(v: int | None) → int | None[source]

n_samples is a positive integer or None.

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

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