use of ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType in project Gemma by PavlidisLab.
the class PreprocessorServiceImpl method batchCorrect.
@Override
public void batchCorrect(ExpressionExperiment ee, boolean force) throws PreprocessingException {
String note = "ComBat batch correction";
String detail = null;
/*
* This leaves the raw data alone; it updates the processed data.
*/
this.checkArrayDesign(ee);
ee = expressionExperimentService.thawLite(ee);
this.checkCorrectable(ee, force);
/*
* If there are predicted outliers, but which we decide are okay, we just go ahead.
*/
if (!force) {
this.checkOutliers(ee);
} else {
note = "[Forced]" + note;
detail = "Batch correction skipped outlier check.";
PreprocessorServiceImpl.log.warn(detail);
}
try {
Collection<ProcessedExpressionDataVector> vecs = this.getProcessedExpressionDataVectors(ee);
// TODO log-transform if not already, update QT. See https://github.com/PavlidisLab/Gemma/issues/50
ExpressionDataDoubleMatrix correctedData = this.getCorrectedData(ee, vecs);
// Convert to vectors
processedExpressionDataVectorService.createProcessedDataVectors(ee, correctedData.toProcessedDataVectors());
AuditEventType eventType = BatchCorrectionEvent.Factory.newInstance();
String bConf = expressionExperimentService.getBatchConfound(ee);
if (bConf != null && force) {
String add = "Batch correction forced over a detected confound: " + bConf;
// noinspection ConstantConditions // That is simply false.
detail = (detail == null) ? add : detail + "\n" + add;
}
auditTrailService.addUpdateEvent(ee, eventType, note, detail);
this.removeInvalidatedData(ee);
this.processExceptForVectorCreate(ee);
} catch (Exception e) {
throw new PreprocessingException(e);
}
}
use of ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType in project Gemma by PavlidisLab.
the class VectorMergingServiceImpl method audit.
private void audit(ExpressionExperiment ee, String note) {
AuditEventType eventType = ExpressionExperimentVectorMergeEvent.Factory.newInstance();
auditTrailService.addUpdateEvent(ee, eventType, note);
}
use of ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType in project Gemma by PavlidisLab.
the class ProcessedExpressionDataVectorCreateHelperServiceImpl method audit.
private void audit(ExpressionExperiment ee) {
AuditEventType eventType = ProcessedVectorComputationEvent.Factory.newInstance();
auditTrailService.addUpdateEvent(ee, eventType, "");
}
use of ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType in project Gemma by PavlidisLab.
the class ArrayDesignProbeRenamerCli method audit.
private void audit(ArrayDesign arrayDesign, String note) {
super.arrayDesignReportService.generateArrayDesignReport(arrayDesign.getId());
AuditEventType eventType = ArrayDesignProbeRenamingEvent.Factory.newInstance();
auditTrailService.addUpdateEvent(arrayDesign, eventType, note);
}
use of ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType in project Gemma by PavlidisLab.
the class ArrayDesignSubsumptionTesterCli method audit.
private void audit(ArrayDesign arrayDesign, String note) {
AuditEventType eventType = ArrayDesignSubsumeCheckEvent.Factory.newInstance();
auditTrailService.addUpdateEvent(arrayDesign, eventType, note);
}
Aggregations