torchcell.datamodels.schema.GeneAdditionPerturbation
- class GeneAdditionPerturbation(*, systematic_gene_name: str, perturbed_gene_name: str, gene_namespace: ~typing.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: ~torchcell.datamodels.schema.DerivedIdentifierMapping | None = None, provenance: str = 'engineered', state: str = 'present', mechanism_so_id: str = 'SO:0000667', mechanism_so_name: str = 'insertion', provenance_gaps: list[~torchcell.verification.sourced.ProvenanceGap] = <factory>, description: str = 'Gene addition (heterologous expression or extra native copy)', perturbation_type: ~typing.Literal['gene_addition'] = 'gene_addition', source_organism: str, is_heterologous: bool, localization: ~torchcell.datamodels.schema.Localization, replicon_statement: str | None = None, construct_name: str | None = None, integration_locus: str | None = None, placement: ~torchcell.datamodels.schema.ConstructPlacement | None, variant: str | None = None)[source]
Bases:
HashableProvenanceGapMixin,PresenceAbsencePerturbation,ModelStrictGain-of-function: a gene ADDED to the strain (heterologous expression or an extra native copy), carried on a plasmid or integrated at a chromosomal locus.
Unlike the loss-of-function perturbations, an added gene may be HETEROLOGOUS (crtYB/crtI from Xanthophyllomyces dendrorhous; CYP76AD1/DOD from plants) and so has NO S. cerevisiae systematic name –
systematic_gene_namethen carries the heterologous gene symbol and the native-name validator is relaxed for this class. For an extra NATIVE copy (Ozaydin BTS1)systematic_gene_nameis the real systematic name andis_heterologousis False.placementis the material of the addition: which contig the DNA came from, by its sha256 and anArtifactRefthat pins the same bytes, which feature of that contig the added gene is, where in the host it landed, and which contig-relative variants it carries. It is REQUIRED with no default and gap-able (the shapeMedia.nameandHeterologousPathwayPerturbation.source_organismuse), so a loader states the pointer or a typedProvenanceGapnaming its reason and where it looked. It replaces the formerplasmid_contig_idandlocus_tag, two free strings into a store that did not exist which wereNonein 26 of 26 served stores: a typed absence is countable (torchcell.verification.construct_placement) and a silent one is not.localizationis the two-memberLocalizationvocabulary, since the replicon’s identity is a property of the CONTIG rather than of the gene riding on it, andreplicon_statementkeeps the source’s own words ("episomal 2 micron","low copy CEN plasmid") verbatim for the records that have no deposited construct.variantstays the source’s verbatim statement; the same allele as a coordinate is aConstructVariantCallon the placement, and the two are kept side by side so a disagreement between them stays visible.Embeddings are constructed downstream from the referenced sequence, never baked here. Design:
[[torchcell.datamodels.gene-addition-perturbation-design]].- classmethod validate_sys_gene_name(v: str) str[source]
Relax the native-name validator: an added gene may be heterologous (no yeast systematic name), so accept any non-empty identifier.
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].