Class SingleCellExpressionExperimentCreateSubSetsAndAggregateServiceImpl
- All Implemented Interfaces:
SingleCellExpressionExperimentCreateSubSetsAndAggregateService
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSubSetsAndAggregate(ExpressionExperiment expressionExperiment, QuantitationType scQt, CellLevelCharacteristics clc, ExperimentalFactor cellTypeFactor, Map<Characteristic, FactorValue> c2f, SingleCellExperimentSubSetsCreationConfig singleCellExperimentSubSetsCreationConfig, SingleCellAggregationConfig config) SeecreateSubSetsAndAggregateByCellType(ExpressionExperiment, SingleCellExperimentSubSetsCreationConfig, SingleCellAggregationConfig)for why this isPropagation.NEVER.createSubSetsAndAggregateByCellType(ExpressionExperiment expressionExperiment, SingleCellExperimentSubSetsCreationConfig singleCellExperimentSubSetsCreationConfig, SingleCellAggregationConfig config) Not transactional:SingleCellExpressionExperimentSubSetService.createSubSets(ExpressionExperiment, SingleCellDimension, CellLevelCharacteristics, ExperimentalFactor, Map, SingleCellExperimentSubSetsCreationConfig)commits the subset/BioAssay/BioMaterial rows it creates — and with them the ACL rowsAclEventListenerinserts alongside each — BEFORESingleCellExpressionExperimentAggregateService.aggregateVectors(ExpressionExperiment, QuantitationType, List, CellLevelCharacteristics, ExperimentalFactor, Map, SingleCellAggregationConfig)opens its own, separate, potentially hour-long transaction to stream and aggregate the single-cell data.redoAggregate(ExpressionExperiment expressionExperiment, QuantitationType scQt, CellLevelCharacteristics clc, ExperimentalFactor factor, Map<Characteristic, FactorValue> c2f, BioAssayDimension dimension, QuantitationType previousQt, SingleCellAggregationConfig config) Re-aggregate a dataset by any cell-level characteristics.redoAggregateByCellType(ExpressionExperiment expressionExperiment, BioAssayDimension dimension, QuantitationType previousQt, SingleCellAggregationConfig config) Re-aggregate a dataset by cell type.
-
Constructor Details
-
SingleCellExpressionExperimentCreateSubSetsAndAggregateServiceImpl
public SingleCellExpressionExperimentCreateSubSetsAndAggregateServiceImpl()
-
-
Method Details
-
createSubSetsAndAggregateByCellType
@Transactional(propagation=NEVER) public QuantitationType createSubSetsAndAggregateByCellType(ExpressionExperiment expressionExperiment, SingleCellExperimentSubSetsCreationConfig singleCellExperimentSubSetsCreationConfig, SingleCellAggregationConfig config) Not transactional:SingleCellExpressionExperimentSubSetService.createSubSets(ExpressionExperiment, SingleCellDimension, CellLevelCharacteristics, ExperimentalFactor, Map, SingleCellExperimentSubSetsCreationConfig)commits the subset/BioAssay/BioMaterial rows it creates — and with them the ACL rowsAclEventListenerinserts alongside each — BEFORESingleCellExpressionExperimentAggregateService.aggregateVectors(ExpressionExperiment, QuantitationType, List, CellLevelCharacteristics, ExperimentalFactor, Map, SingleCellAggregationConfig)opens its own, separate, potentially hour-long transaction to stream and aggregate the single-cell data.Wrapping both in one transaction (as this method did until 2026-09-30) holds those ACL inserts' locks for the aggregation's entire duration. Every ACL insert anywhere in Gemma references one of a handful of shared
acl_sidrows and a sharedacl_classrow per entity type, so a long-held lock here blocks unrelated ACL-creating writers elsewhere in the system — measured on frink 2026-09-30:diffExAnalyzefailed 14+ times over roughly an hour withLock wait timeout exceededon its ownacl_entryinsert while this method's transaction, opened by a concurrentaggregateSingleCellDatarun, was still open and had not touched an ACL table in well over an hour.Propagation.NEVERrather than simply dropping@Transactional: it fails loudly if this is ever called from within an existing transaction instead of silently joining one and reintroducing the problem.SingleCellExpressionExperimentSubSetService.createSubSets(ExpressionExperiment, SingleCellDimension, CellLevelCharacteristics, ExperimentalFactor, Map, SingleCellExperimentSubSetsCreationConfig),SingleCellExpressionExperimentAggregateService.aggregateVectors(ExpressionExperiment, QuantitationType, List, CellLevelCharacteristics, ExperimentalFactor, Map, SingleCellAggregationConfig)andSingleCellExpressionExperimentAggregateService.aggregateVectorsByCellType(ExpressionExperiment, List, SingleCellAggregationConfig)remain independently@Transactional— each opens its own transaction exactly as it already does when called directly from outside this class.- Specified by:
createSubSetsAndAggregateByCellTypein interfaceSingleCellExpressionExperimentCreateSubSetsAndAggregateService- See Also:
-
createSubSetsAndAggregate
@Transactional(propagation=NEVER) public QuantitationType createSubSetsAndAggregate(ExpressionExperiment expressionExperiment, QuantitationType scQt, CellLevelCharacteristics clc, ExperimentalFactor cellTypeFactor, Map<Characteristic, FactorValue> c2f, SingleCellExperimentSubSetsCreationConfig singleCellExperimentSubSetsCreationConfig, SingleCellAggregationConfig config) SeecreateSubSetsAndAggregateByCellType(ExpressionExperiment, SingleCellExperimentSubSetsCreationConfig, SingleCellAggregationConfig)for why this isPropagation.NEVER.- Specified by:
createSubSetsAndAggregatein interfaceSingleCellExpressionExperimentCreateSubSetsAndAggregateService- See Also:
-
redoAggregateByCellType
@Transactional public QuantitationType redoAggregateByCellType(ExpressionExperiment expressionExperiment, BioAssayDimension dimension, @Nullable QuantitationType previousQt, SingleCellAggregationConfig config) Description copied from interface:SingleCellExpressionExperimentCreateSubSetsAndAggregateServiceRe-aggregate a dataset by cell type.- Specified by:
redoAggregateByCellTypein interfaceSingleCellExpressionExperimentCreateSubSetsAndAggregateService- Parameters:
dimension- a dimension to reuse for aggregatingpreviousQt- a previous quantitation type the re-aggregated one is replacing, it will be removed prior to the new one being added. Ignored if null.- See Also:
-
redoAggregate
@Transactional public QuantitationType redoAggregate(ExpressionExperiment expressionExperiment, QuantitationType scQt, CellLevelCharacteristics clc, ExperimentalFactor factor, Map<Characteristic, FactorValue> c2f, BioAssayDimension dimension, @Nullable QuantitationType previousQt, SingleCellAggregationConfig config) Description copied from interface:SingleCellExpressionExperimentCreateSubSetsAndAggregateServiceRe-aggregate a dataset by any cell-level characteristics.- Specified by:
redoAggregatein interfaceSingleCellExpressionExperimentCreateSubSetsAndAggregateService- Parameters:
dimension- a dimension to reuse for aggregatingpreviousQt- a previous quantitation type the re-aggregated one is replacing, it will be removed prior to the new one being added. Ignored if null.- See Also:
-