torchcell.datamodels.schema.EngineeredCopyNumberPerturbation
- class EngineeredCopyNumberPerturbation(*, 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 = 'engineered', description: str = 'Engineered copy-number/dosage change of a present native gene', perturbation_type: Literal['engineered_copy_number'] = 'engineered_copy_number', state: str = 'present', mechanism_so_id: str = 'SO:0001019', mechanism_so_name: str = 'copy_number_variation', copy_number: float, reference_copy_number: float, marker: str | None = None)[source]
Bases:
GenePerturbation,ModelStrictAn ENGINEERED copy-number/dosage change of a PRESENT native gene.
The engineered counterpart of the natural
CopyNumberVariantPerturbation: same dosage axis and SOcopy_number_variationmechanism, butprovenance="engineered"and referring to a REAL S288C reference gene (the base systematic-name validator applies – NOT relaxed, these are not pangenome ORFs). It hangs directly offGenePerturbationin parallel with the natural CNV leaf (the dosage axis has no intermediate ABC; mirroring the existing pattern keeps the hierarchy symmetric and reparents nothing).Motivating case – HIP/HOP chemogenomics (Hoepfner/FitDb/Lee) in a DIPLOID: a HIP HETEROZYGOUS deletion drops one autosomal gene from 2 -> 1 copies, i.e.
EngineeredCopyNumberPerturbation(copy_number=1, reference_copy_number=2, marker="KanMX"). (A HOP HOMOZYGOUS deletion is total absence and stays aDeletionPerturbation.)reference_copy_numberis the copies in the reference (=ReferenceGenome.ploidyfor an autosomal gene);markeris the optional selection cassette on the affected allele. The gene remains PRESENT, sostate="present".- classmethod validate_copy_number_positive(v: float) float[source]
M2: dosage of a PRESENT gene –
copy_number > 0(0 copies is a total knockout, i.e. aDeletionPerturbationabsence, not a CNV).
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].