torchcell.datamodels.schema.PresenceAbsencePerturbation

class PresenceAbsencePerturbation(*, systematic_gene_name: str, perturbed_gene_name: str, gene_namespace: Literal['scerevisiae_s288c_sgd_systematic', 'scerevisiae_cenpk113_7d_locus_tag', 'scerevisiae_peter2018_pangenome_orf', 'ecoli_k12_mg1655_bnumber', 'ecoli_k12_bw25113_locus_tag', 'pputida_kt2440_locus_tag', 'ecoli_b_rel606_locus_tag', 'ecoli_k12_w3110_refseq_locus_tag'], identifier_mapping: DerivedIdentifierMapping | None = None, provenance: str = 'engineered', state: str, mechanism_so_id: str, mechanism_so_name: str)[source]

Bases: GenePerturbation, ModelStrict

AXIS 1 – a gene is PRESENT or ABSENT relative to the reference.

state is the neutral biological fact (“absent” spans an engineered KO and a natural core-loss alike); mechanism_so_id/mechanism_so_name name the SO mechanism. This ABC sets NO default for either – every concrete child declares its own (deletion=absent/SO:0000159, insertion=present/SO:0000667).

classmethod validate_state(v: str) → str[source]

State is either present or absent.

classmethod validate_mechanism_so_id(v: str) → str[source]

Mechanism SO id is well-formed.

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

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