torchcell.datamodels.schema.NaturalGeneAbsencePerturbation

class NaturalGeneAbsencePerturbation(*, 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 = 'natural', state: str = 'absent', mechanism_so_id: str = 'SO:0000159', mechanism_so_name: str = 'deletion', description: str = 'Natural absence of a reference gene in an isolate vs S288C', perturbation_type: Literal['natural_gene_absence'] = 'natural_gene_absence', strain_id: str, pangenome_orf_id: str | None = None, sequence_source: str | None = None, sequence_ref: ArtifactRef | None = None)[source]

Bases: PresenceAbsencePerturbation, ModelStrict

A reference (core) gene ABSENT in a natural isolate (Caudal core-loss).

The NATURAL counterpart of an engineered deletion: same AXIS-1 state="absent" and SO deletion mechanism, but provenance="natural". Replaces the former mis-use of CopyNumberVariantPerturbation (copy_number 0) for absence – CNV is now reserved for dosage of a PRESENT gene. The gene id may be a pangenome/accessory id, so the native-name validator is relaxed (as for GeneAddition). Sequence, when known, is an off-graph ArtifactRef (sequence_ref), never inlined.

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

Relax: an accessory/pangenome ORF has no yeast systematic name.

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

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