torchcell.datamodels.schema.NaturalGenePresencePerturbation
- class NaturalGenePresencePerturbation(*, 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 = 'present', mechanism_so_id: str = 'SO:0000667', mechanism_so_name: str = 'insertion', description: str = 'Natural presence of an accessory gene in an isolate vs S288C', perturbation_type: Literal['natural_gene_presence'] = 'natural_gene_presence', strain_id: str, copy_number: float = 1.0, pangenome_orf_id: str | None = None, origin: str | None = None, sequence_source: str | None = None, sequence_ref: ArtifactRef | None = None)[source]
Bases:
PresenceAbsencePerturbation,ModelStrictA non-reference (accessory) gene PRESENT in a natural isolate (Caudal accessory).
The NATURAL counterpart of an engineered gene addition: AXIS-1
state="present"with SOinsertionmechanism andprovenance="natural". Replaces the former mis-use ofCopyNumberVariantPerturbationfor accessory-presence – CNV is now reserved for dosage of a PRESENT gene.copy_numberrecords how many copies are present (default 1.0);originannotates the accessory ORF’s provenance with the field’s vocabulary (ancestral | introgression | hgt). The native-name validator is relaxed; sequence is an off-graph pointer, never inlined.- classmethod validate_copy_number_positive(v: float) float[source]
M2: this leaf means the gene IS present, so
copy_number > 0(absence isNaturalGeneAbsencePerturbation, never copy_number=0).
- 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].