torchcell.datamodels.schema.ReferenceGenome
- class ReferenceGenome(*, provenance_gaps: list[~torchcell.verification.sourced.ProvenanceGap] = <factory>, species: str, strain: str, ploidy: ~typing.Literal['haploid', 'diploid'] = 'haploid', assembly_set: ~typing.Literal['ecoli_K12_MG1655_ASM584v2', 'ecoli_K12_BW25113_ASM75055v1', 'pputida_KT2440_ASM756v2', 'ecoli_B_REL606_ASM1798v1', 'ecoli_K12_W3110_ASM1024v1', 'sgd_S288C_R64-4-1_20230830', 'scerevisiae_CENPK113-7D_ASM257140v2'] | None, assembly_accession: str | None)[source]
Bases:
HashableProvenanceGapMixinThe deposited reference a record’s identifiers and background edits are written against.
speciesandstrainname the host as the source writes it.ploidyis the genome-wide baseline copy number of the unperturbed strain ("haploid"= 1 autosomal copy,"diploid"= 2). It lives here, not on a perturbation, because it applies to the WHOLE genome (WT and every unperturbed gene alike); a per-locusEngineeredCopyNumberPerturbation.copy_numberrecords the deviation from this baseline. Defaults to"haploid".assembly_setis the deposited set in the genomes tier (sha256-pinned FASTA plus GFF) that the record’s gene identifiers and coordinates, and the background’s edits, are written against. It has ONE meaning, and that meaning is NOT “this strain’s own assembly”: a BY4741 or FY4 record pinssgd_S288C_R64-4-1_20230830because its systematic names and its background alleles are edits against the S288C release, exactly as a BW25113 record pins the BW25113 set because its locus tags are that assembly’s. Since P5 that is literally one rule: aStrainBackgroundpins the set of its ownreference_strain, andStrainReferenceGenomerequires the reference and the background to pin the same one.The pin is REQUIRED: a value, or a typed
ProvenanceGaponassembly_setfor a record whose reference is not deposited in the tier (an isolate’s own annotation, a BL21ECBD_tag space). Depositing the set is what closes such a gap, so its reason isdeferred_pending_source_reviewwithnotenaming the reference to deposit. A silent default to S288C would be a fallback; the field has no default, so every loader states its reference.assembly_accessionis the NCBI accession of the pinned set (GenBankGCA_or RefSeqGCF_, one of that set’s own inASSEMBLY_SET_ACCESSIONS): required whenever a set is pinned andNoneexactly when the set is gapped.This is the reference of a record whose strain IS the deposited reference. A typed strain background is carried by
StrainReferenceGenome(#507), whosebackgroundis required. Hashable through the mixin (the canonical JSON), as it was before it carried a gap list.- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].