torchcell.datamodels.schema.BackgroundAllele
- class BackgroundAllele(*, provenance_gaps: list[~torchcell.verification.sourced.ProvenanceGap] = <factory>, systematic_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'], gene_name: str, allele_name: str, edit: ~torchcell.datamodels.schema.AlleleEdit, functional: bool, zygosity: ~torchcell.datamodels.schema.Zygosity | None = None, cassette: str | None = None, deleted_span: ~torchcell.datamodels.schema.GenomicSpan | None = None, provenance: list[~torchcell.verification.sourced.SourcedValue] | None = None)[source]
Bases:
ProvenanceGapMixinOne allele a strain background carries, as an edit against its reference genome.
ONE class for every host (P5, ontology-unify 2026-10-15).
gene_namespacenames the identifier spacesystematic_gene_nameis written in, exactly as it does on everyGenePerturbationsince P1: before this field a background allele could name a gene and not say which space the name was in, while the perturbation beside it could, and the only way to state a bacterial locus tag was to choose the retiredBacterialBackgroundAlleleclass. It is REQUIRED with no default, since class accepts the identifier of any deposited namespace and so the stored name’s form is not by itself the loader’s statement of the host; the two must agree (_namespace_of_identifier), so a KT2440 tag cannot be filed under the MG1655 namespace and a b-number cannot be filed under S288C.allele_nameis the designation verbatim as the source writes it (his3Δ1,can1Δ::STE2pr-Sp_his5,lacZ4787);gene_nameis the CURRENT standard name the reference’s annotation carries (MET17for themet15Δ0allele,lacZforlacZ4787);systematic_gene_nameis the feature the edit sits in (an R64 ORF name, a locus tag).functionalsays whether the allele keeps the gene’s function (False for every BY marker allele), which is what per-locus dosage reads.cassetteis required for acassette_replacementand forbidden otherwise.zygosityis optional HERE and constrained by the background that carries it: a single-copy genome has one possible copy count and so nothing to state, whichStrainBackgroundenforces asNone, whileEukaryoticStrainBackgroundrequires every allele’s zygosity to be stated or typed-gapped and to fit the ploidy. The guarantee the yeast records had is therefore unchanged; what moved is where it is asserted, which is the only place that can judge it.Sourcing contract:
provenance(quote + sha256) or a typedProvenanceGaponprovenance, never neither. A literature-standard allele whose source is not mirrored (the BY alleles before Brachmann 1998 is mirrored) is ASSERTED with adeferred_pending_source_reviewgap naming the paper that would close it, so the record carries the allele and says plainly that it is unverified.deleted_spanis optional (coordinates are rarely published).- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].