Search in sources :

Example 1 with BatchInfoPopulationService

use of ubic.gemma.core.analysis.preprocess.batcheffects.BatchInfoPopulationService in project Gemma by PavlidisLab.

the class BatchEffectPopulationCli method doWork.

@Override
protected Exception doWork(String[] args) {
    Exception ex = super.processCommandLine(args);
    if (ex != null)
        return ex;
    BatchInfoPopulationService ser = this.getBean(BatchInfoPopulationService.class);
    for (BioAssaySet bas : this.expressionExperiments) {
        if (bas instanceof ExpressionExperiment) {
            if (!force && this.noNeedToRun(bas, BatchInformationFetchingEvent.class)) {
                AbstractCLI.log.debug("Can't or don't need to run " + bas);
                continue;
            }
            AbstractCLI.log.info("Processing: " + bas);
            try {
                ExpressionExperiment ee = (ExpressionExperiment) bas;
                ee = this.eeService.thawLite(ee);
                boolean success = ser.fillBatchInformation(ee, force);
                if (success) {
                    this.successObjects.add(bas.toString());
                } else {
                    this.errorObjects.add(bas.toString());
                }
            } catch (Exception e) {
                AbstractCLI.log.error(e, e);
                this.errorObjects.add(bas + ": " + e.getMessage());
            }
        }
    }
    this.summarizeProcessing();
    return null;
}
Also used : BioAssaySet(ubic.gemma.model.expression.experiment.BioAssaySet) BatchInfoPopulationService(ubic.gemma.core.analysis.preprocess.batcheffects.BatchInfoPopulationService) ExpressionExperiment(ubic.gemma.model.expression.experiment.ExpressionExperiment) BatchInformationFetchingEvent(ubic.gemma.model.common.auditAndSecurity.eventType.BatchInformationFetchingEvent)

Aggregations

BatchInfoPopulationService (ubic.gemma.core.analysis.preprocess.batcheffects.BatchInfoPopulationService)1 BatchInformationFetchingEvent (ubic.gemma.model.common.auditAndSecurity.eventType.BatchInformationFetchingEvent)1 BioAssaySet (ubic.gemma.model.expression.experiment.BioAssaySet)1 ExpressionExperiment (ubic.gemma.model.expression.experiment.ExpressionExperiment)1