torchcell.datamodels.schema.Genotype

class Genotype(*, perturbations: list[SgaKanMxDeletionPerturbation | SgaNatMxDeletionPerturbation | SgaDampPerturbation | SgaTsAllelePerturbation | SgaSuppressorAllelePerturbation | SgaAllelePerturbation | MeanDeletionPerturbation | MarkerDeletionPerturbation | DeletionPerturbation | KanMxDeletionPerturbation | BarcodedKanMxDeletionPerturbation | HeterozygousDeletionPerturbation | ConditionalAllelePerturbation | NatMxDeletionPerturbation | CrisprDeletionPerturbation | GeneAdditionPerturbation | NaturalGeneAbsencePerturbation | NaturalGenePresencePerturbation | SequenceVariantPerturbation | NaturalLossOfFunctionPerturbation | CopyNumberVariantPerturbation | EngineeredCopyNumberPerturbation | CrisprActivationPerturbation | CrisprInterferencePerturbation | InduciblePromoterInsertionPerturbation | PromoterDrivenGeneIntegrationPerturbation | VariablePromoterReporterPerturbation | DeletionStrainPerturbation | TransposonInsertionPerturbation | PromoterReplacementPerturbation | HeterologousPathwayPerturbation | LocusVariantCallPerturbation | SiteVariantCallPerturbation | SpanDeletionCallPerturbation | MarkedAllelePerturbation | DegronPerturbation | ReleasedIdentifierPerturbation | NamedAllelePerturbation], natural_isolate: NaturalIsolateDescriptor | None = None)[source]

Bases: ModelStrict

Collection of gene perturbations defining a strain’s genotype.

natural_isolate (#988) describes a natural isolate’s whole genome where the perturbations cannot: its ploidy, zygosity, aneuploidy and manipulation. It is None for every other genotype and is then left out of the dump, so a genotype without it serializes exactly as it did before the field existed.

classmethod sort_perturbations(perturbations: list[SgaKanMxDeletionPerturbation | SgaNatMxDeletionPerturbation | SgaDampPerturbation | SgaTsAllelePerturbation | SgaSuppressorAllelePerturbation | SgaAllelePerturbation | MeanDeletionPerturbation | MarkerDeletionPerturbation | DeletionPerturbation | KanMxDeletionPerturbation | BarcodedKanMxDeletionPerturbation | HeterozygousDeletionPerturbation | ConditionalAllelePerturbation | NatMxDeletionPerturbation | CrisprDeletionPerturbation | GeneAdditionPerturbation | NaturalGeneAbsencePerturbation | NaturalGenePresencePerturbation | SequenceVariantPerturbation | NaturalLossOfFunctionPerturbation | CopyNumberVariantPerturbation | EngineeredCopyNumberPerturbation | CrisprActivationPerturbation | CrisprInterferencePerturbation | InduciblePromoterInsertionPerturbation | PromoterDrivenGeneIntegrationPerturbation | VariablePromoterReporterPerturbation | DeletionStrainPerturbation | TransposonInsertionPerturbation | PromoterReplacementPerturbation | HeterologousPathwayPerturbation | LocusVariantCallPerturbation | SiteVariantCallPerturbation | SpanDeletionCallPerturbation | MarkedAllelePerturbation | DegronPerturbation | ReleasedIdentifierPerturbation | NamedAllelePerturbation]) → list[SgaKanMxDeletionPerturbation | SgaNatMxDeletionPerturbation | SgaDampPerturbation | SgaTsAllelePerturbation | SgaSuppressorAllelePerturbation | SgaAllelePerturbation | MeanDeletionPerturbation | MarkerDeletionPerturbation | DeletionPerturbation | KanMxDeletionPerturbation | BarcodedKanMxDeletionPerturbation | HeterozygousDeletionPerturbation | ConditionalAllelePerturbation | NatMxDeletionPerturbation | CrisprDeletionPerturbation | GeneAdditionPerturbation | NaturalGeneAbsencePerturbation | NaturalGenePresencePerturbation | SequenceVariantPerturbation | NaturalLossOfFunctionPerturbation | CopyNumberVariantPerturbation | EngineeredCopyNumberPerturbation | CrisprActivationPerturbation | CrisprInterferencePerturbation | InduciblePromoterInsertionPerturbation | PromoterDrivenGeneIntegrationPerturbation | VariablePromoterReporterPerturbation | DeletionStrainPerturbation | TransposonInsertionPerturbation | PromoterReplacementPerturbation | HeterologousPathwayPerturbation | LocusVariantCallPerturbation | SiteVariantCallPerturbation | SpanDeletionCallPerturbation | MarkedAllelePerturbation | DegronPerturbation | ReleasedIdentifierPerturbation | NamedAllelePerturbation][source]

Sort perturbations by gene name, type, and perturbed name for stable order.

property systematic_gene_names: list[str]

Return systematic gene names ordered by systematic gene name.

property perturbed_gene_names: list[str]

Return perturbed gene names ordered by systematic gene name.

property perturbation_types: list[str]

Return perturbation types ordered by systematic gene name.

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

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