Search in sources :

Example 1 with AuditEventType

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);
    }
}
Also used : AuditEventType(ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType) ExpressionDataDoubleMatrix(ubic.gemma.core.datastructure.matrix.ExpressionDataDoubleMatrix) ProcessedExpressionDataVector(ubic.gemma.model.expression.bioAssayData.ProcessedExpressionDataVector)

Example 2 with AuditEventType

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);
}
Also used : AuditEventType(ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType)

Example 3 with AuditEventType

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, "");
}
Also used : AuditEventType(ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType)

Example 4 with AuditEventType

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);
}
Also used : AuditEventType(ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType)

Example 5 with AuditEventType

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);
}
Also used : AuditEventType(ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType)

Aggregations

AuditEventType (ubic.gemma.model.common.auditAndSecurity.eventType.AuditEventType)22 ArrayDesign (ubic.gemma.model.expression.arrayDesign.ArrayDesign)5 AuditEvent (ubic.gemma.model.common.auditAndSecurity.AuditEvent)3 RawExpressionDataVector (ubic.gemma.model.expression.bioAssayData.RawExpressionDataVector)3 AffyPowerToolsProbesetSummarize (ubic.gemma.core.loader.expression.AffyPowerToolsProbesetSummarize)2 AuditTrail (ubic.gemma.model.common.auditAndSecurity.AuditTrail)2 ExpressionExperiment (ubic.gemma.model.expression.experiment.ExpressionExperiment)2 Taxon (ubic.gemma.model.genome.Taxon)2 AuditTrailService (ubic.gemma.persistence.service.common.auditAndSecurity.AuditTrailService)2 SecurityService (gemma.gsec.SecurityService)1 Method (java.lang.reflect.Method)1 Date (java.util.Date)1 StopWatch (org.apache.commons.lang3.time.StopWatch)1 Query (org.hibernate.Query)1 Test (org.junit.Test)1 Transactional (org.springframework.transaction.annotation.Transactional)1 ExpressionDataDoubleMatrix (ubic.gemma.core.datastructure.matrix.ExpressionDataDoubleMatrix)1 RawDataFetcher (ubic.gemma.core.loader.expression.geo.fetcher.RawDataFetcher)1 Auditable (ubic.gemma.model.common.Auditable)1 AuditEventValueObject (ubic.gemma.model.common.auditAndSecurity.AuditEventValueObject)1