Class BatchInfoPopulationHelperServiceImpl
java.lang.Object
ubic.gemma.core.analysis.preprocess.batcheffects.BatchInfoPopulationHelperServiceImpl
- All Implemented Interfaces:
BatchInfoPopulationHelperService
@Service
public class BatchInfoPopulationHelperServiceImpl
extends Object
implements BatchInfoPopulationHelperService
- Author:
- paul
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPrefix to use when generating batch factor names. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBatchFactor(ExpressionExperiment ee, Map<BioMaterial, Date> dates) createRnaSeqBatchFactor(ExpressionExperiment ee, Map<BioMaterial, String> headers) For RNA-seq, we based the batching on the available device/run/flowcell/lane informationvoidRecord aBatchInformationFetchingEventonee.voidRecord aSingleBatchDeterminationEventonee.
-
Field Details
-
BATCH_FACTOR_NAME_PREFIX
Prefix to use when generating batch factor names.- See Also:
-
-
Constructor Details
-
BatchInfoPopulationHelperServiceImpl
public BatchInfoPopulationHelperServiceImpl()
-
-
Method Details
-
createRnaSeqBatchFactor
@Transactional(noRollbackFor={FASTQHeadersPresentButNotUsableException.class,SingletonBatchesException.class}) @AuditedOnError(value=UninformativeFASTQHeadersForBatchingEvent.class,exception=FASTQHeadersPresentButNotUsableException.class,message="Batches unable to be determined") @AuditedOnError(value=SingletonBatchInvalidEvent.class,exception=SingletonBatchesException.class,message="At least one singleton batch") public ExperimentalFactor createRnaSeqBatchFactor(ExpressionExperiment ee, Map<BioMaterial, String> headers) For RNA-seq, we based the batching on the available device/run/flowcell/lane informationTwo failure modes are surfaced as exceptions so the
AuditedOnErroraspect (which runs@AfterThrowingon the proxy boundary) can write the matching audit row before the caller inBatchInfoPopulationServiceImplcatches them and converts them to anullreturn:FASTQHeadersPresentButNotUsableException→UninformativeFASTQHeadersForBatchingEventSingletonBatchesException→SingletonBatchInvalidEvent
exceptionmatch, so the two declarations dispatch deterministically. The 4-argaddUpdateEventdetail string (the verbose "RNA-seq experiment, FASTQ headers ..." text) is dropped on migration pending theAuditEventPayloadPhase A landing.- Specified by:
createRnaSeqBatchFactorin interfaceBatchInfoPopulationHelperService- Parameters:
ee- experimentheaders- map of biomaterial to a string. If there was no usable FASTQ header, we just use the GPL ID- Returns:
- factor
-
createBatchFactor
@Transactional public ExperimentalFactor createBatchFactor(ExpressionExperiment ee, Map<BioMaterial, Date> dates) - Specified by:
createBatchFactorin interfaceBatchInfoPopulationHelperService
-
recordSingleBatchDetermination
@Transactional @Audited(value=SingleBatchDeterminationEvent.class, messageSpel="#note") public void recordSingleBatchDetermination(ExpressionExperiment ee, String note) Record aSingleBatchDeterminationEventonee. Exists so the branch inBatchInfoPopulationServiceImplthat chooses between a single-batch and a multi-batch event can dispatch through a Spring proxy carrying a single, deterministicAuditedannotation -- the@Auditedaspect requires one event class per method, so the original multi-branch private method had to be split.The
Auditedannotation drives emission through theAuditedAspect; this method body is intentionally a logging-only marker so the proxy-intercepted return triggers exactly oneSingleBatchDeterminationEvent.- Specified by:
recordSingleBatchDeterminationin interfaceBatchInfoPopulationHelperService- Parameters:
ee- experimentnote- short summary stored inAUDIT_EVENT.NOTE
-
recordBatchInformationFetched
@Transactional @Audited(value=BatchInformationFetchingEvent.class, messageSpel="#note") public void recordBatchInformationFetched(ExpressionExperiment ee, String note) Record aBatchInformationFetchingEventonee. Companion toBatchInfoPopulationHelperService.recordSingleBatchDetermination(ExpressionExperiment, String)for the multi-batch branch; see that method's javadoc for rationale.Companion to
recordSingleBatchDetermination(ExpressionExperiment, String); see that method for the dispatch rationale.- Specified by:
recordBatchInformationFetchedin interfaceBatchInfoPopulationHelperService- Parameters:
ee- experimentnote- short summary stored inAUDIT_EVENT.NOTE
-