torchcell.datamodels.schema.SequenceVariantPerturbation

class SequenceVariantPerturbation(*, 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'] = 'scerevisiae_s288c_sgd_systematic', identifier_mapping: DerivedIdentifierMapping | None = None, provenance: str = 'natural', mechanism_so_id: str = 'SO:0001483', mechanism_so_name: str = 'SNV', description: str = 'Sequence variant (SNP/indel) of a native gene vs the S288C reference; sequence by off-graph pointer', perturbation_type: Literal['sequence_variant'] = 'sequence_variant', strain_id: str, sequence_source: str | None = None, sequence_ref: ArtifactRef | None = None)[source]

Bases: SequencePerturbation, ModelStrict

SNP/indel-level allelic variation: a native gene whose sequence in this strain differs from the S288C reference, captured via an off-graph pointer.

NATURAL-variation type (contrast the ENGINEERED perturbations, which carry a marker / construct / donor organism). Distinct from AllelePerturbation (a prose amino-acid- substitution description): this points at the strain’s ACTUAL variant allele. The base systematic-name validator applies – these are real S. cerevisiae reference genes (YAL001C …). The sequence is NEVER inlined: sequence_source + strain_id + sequence_ref identify the record in the off-graph gene-keyed store (an ArtifactRef, dereferenced at load and verified by its sha256), mirroring the GeneAddition pointer pattern.

Naming follows population-genomics usage (sequence variant = SNP + indel), NOT the phylogenetic “gene gain/loss” vocabulary (which asserts a lineage polarity a pairwise reference comparison cannot). Together with CopyNumberVariantPerturbation this lets a NATURAL ISOLATE be modeled as a perturbation set off S288C (~4,500 sequence variants per isolate). Design: [[torchcell.datasets.scerevisiae.caudal2024]].

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

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