torchcell.datamodels.schema.HeterozygousDeletionPerturbation

class HeterozygousDeletionPerturbation(*, 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'] = 'scerevisiae_s288c_sgd_systematic', identifier_mapping: ~torchcell.datamodels.schema.DerivedIdentifierMapping | None = None, provenance: str = 'engineered', state: str = 'present', mechanism_so_id: str = 'SO:0000159', mechanism_so_name: str = 'deletion', provenance_gaps: list[~torchcell.verification.sourced.ProvenanceGap] = <factory>, description: str = 'Heterozygous deletion: one allele of a diploid replaced by a cassette', perturbation_type: ~typing.Literal['heterozygous_deletion'] = 'heterozygous_deletion', cassette: str | None = None, barcode: str | None = None, downtag_barcode: str | None = None, collection: str | None = None, construction: ~torchcell.datamodels.schema.StrainConstruction | None = None, constructed_orf: ~torchcell.datamodels.schema.ConstructedOrf | None = None, replaced_allele: str | None = None)[source]

Bases: HashableProvenanceGapMixin, PresenceAbsencePerturbation, ModelStrict

One allele of a diploid replaced by a deletion cassette (HIP / het collection).

Replaces the EngineeredCopyNumberPerturbation(copy_number=1, reference_copy_number=2) encoding for HIP-style data (#506 point 3). A heterozygous deletion is an ALLELE edit, not a dosage statement: the copy-number form asserted “1 of 2 working copies” even at loci where the background was already null (BY4743 his3Δ1/his3Δ1: 0 working copies before and after). The functional dose is now DERIVED from this leaf plus the reference’s StrainBackground (heterozygous_deletion_functional_copies).

The gene stays PRESENT on the other allele, so state="present"; the SO mechanism is the deletion of one allele. It is deliberately NOT a DeletionPerturbation subclass, so an “every knockout” filter (issubclass(_, DeletionPerturbation)) does not count a heterozygote as an absent gene. replaced_allele names which allele the cassette replaced when the background is itself heterozygous at the locus (BY4743 LYS2/lys2Δ0, MET15/met15Δ0); set or gap it there.

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

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