torchcell.data.GenotypeAggregator
- class GenotypeAggregator(root: str)[source]
Bases:
AggregatorAggregator keyed by a hash of the experiment’s full perturbation set.
- aggregate_check(data: dict[str, Experiment | FitnessExperiment | GeneInteractionExperiment | GeneEssentialityExperiment | SyntheticLethalityExperiment | SyntheticRescueExperiment | CalMorphExperiment | MicroarrayExpressionExperiment | MicroarrayExpressionScoreExperiment | MicroarrayExpressionRatioExperiment | InductionTimecourseExpressionExperiment | RNASeqExpressionExperiment | PseudobulkExpressionExperiment | VisualScoreExperiment | MetaboliteExperiment | ProteinAbundanceExperiment | ProteinFoldChangeExperiment | EnvironmentResponseExperiment | StrainEnvironmentResponseExperiment | SegregantGrowthExperiment | SegregantPerturbationExperiment | ProductTiterExperiment | ProteinTurnoverExperiment | ProteinSynthesisRateExperiment | FluxExperiment | PromoterActivityExperiment | PooledSortSeqExpressionExperiment | BiosensorFluorescenceExperiment | GradedGeneEssentialityExperiment | PhosphositeIntensityExperiment | MorphologyExperiment | MrnaNumberFractionExperiment | FitnessContrastExperiment | SegregantExpressionExperiment | LifeCycleExperiment | PseudobulkUmiCountExperiment | GenomeArchitectureExperiment | ExperimentReference | FitnessExperimentReference | GeneInteractionExperimentReference | GeneEssentialityExperimentReference | SyntheticLethalityExperimentReference | SyntheticRescueExperimentReference | CalMorphExperimentReference | MicroarrayExpressionExperimentReference | MicroarrayExpressionScoreExperimentReference | MicroarrayExpressionRatioExperimentReference | InductionTimecourseExpressionExperimentReference | RNASeqExpressionExperimentReference | PseudobulkExpressionExperimentReference | VisualScoreExperimentReference | MetaboliteExperimentReference | ProteinAbundanceExperimentReference | ProteinFoldChangeExperimentReference | EnvironmentResponseExperimentReference | StrainEnvironmentResponseExperimentReference | SegregantGrowthExperimentReference | SegregantPerturbationExperimentReference | ProductTiterExperimentReference | ProteinTurnoverExperimentReference | ProteinSynthesisRateExperimentReference | FluxExperimentReference | PromoterActivityExperimentReference | PooledSortSeqExpressionExperimentReference | BiosensorFluorescenceExperimentReference | GradedGeneEssentialityExperimentReference | PhosphositeIntensityExperimentReference | MorphologyExperimentReference | MrnaNumberFractionExperimentReference | FitnessContrastExperimentReference | SegregantExpressionExperimentReference | LifeCycleExperimentReference | PseudobulkUmiCountExperimentReference | GenomeArchitectureExperimentReference]) str[source]
Return a SHA-256 hash of the experiment’s perturbed gene set.
Keyed on the sorted SET of systematic_gene_names ONLY (perturbation_type is intentionally dropped) so this matches how
MeanExperimentDeduplicator.duplicate_checkgroups genotypes. This lets the same genotype expressed across modalities co-locate: a singleton expression record (marker-specific type, e.g.kanmx_deletion) and a replicated fitness record rewritten tomean_deletionby the deduplicator share one bucket because their perturbed gene set is equal. (The deduplicator additionally keys onexperiment_type; the aggregator must NOT, since merging across modalities is the whole point here.)Every perturbation counts toward the key, including heterologous
gene_additioncassette genes. That makes a cassette-bearing production strain key-disjoint from an otherwise identical single-deletion strain – seeDeletionKeyedGenotypeAggregatorfor the variant that treats a constant cassette as reference-strain background.# TODO When non-deletion perturbation axes are introduced (overexpression, # allele swaps, integrations, etc.), this key MUST become #
(gene-set, perturbation-axis)so that a deletion and an # overexpression of the SAME gene are not merged into one bucket. Today # every perturbation is a deletion, so the gene set alone is unambiguous.