use of ubic.gemma.model.expression.experiment.ExpressionExperiment 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;
}
use of ubic.gemma.model.expression.experiment.ExpressionExperiment in project Gemma by PavlidisLab.
the class ExperimentalDesignImportCli method locateExpressionExperiment.
/**
* @param shortName short name of the experiment to find.
* @return experiment with the given short name, if it exists. Bails otherwise with {@link ubic.gemma.core.util.AbstractCLI.ErrorCode#INVALID_OPTION}.
*/
// Possible external use
@SuppressWarnings({ "unused", "WeakerAccess" })
protected ExpressionExperiment locateExpressionExperiment(String shortName) {
if (shortName == null) {
errorObjects.add("Expression experiment short name must be provided");
return null;
}
ExpressionExperimentService eeService = this.getBean(ExpressionExperimentService.class);
ExpressionExperiment experiment = eeService.findByShortName(shortName);
if (experiment == null) {
AbstractCLI.log.error("No experiment " + shortName + " found");
this.bail(ErrorCode.INVALID_OPTION);
}
return experiment;
}
use of ubic.gemma.model.expression.experiment.ExpressionExperiment in project Gemma by PavlidisLab.
the class ExperimentalDesignWriterCLI method doWork.
@Override
protected Exception doWork(String[] args) {
Exception e = super.processCommandLine(args);
if (e != null)
return e;
for (BioAssaySet ee : expressionExperiments) {
if (ee instanceof ExpressionExperiment) {
ExperimentalDesignWriter edWriter = new ExperimentalDesignWriter();
try (PrintWriter writer = new PrintWriter(outFileName + "_" + FileTools.cleanForFileName(((ExpressionExperiment) ee).getShortName()) + ".txt")) {
edWriter.write(writer, (ExpressionExperiment) ee, true);
writer.flush();
writer.close();
} catch (IOException exception) {
return exception;
}
} else {
throw new UnsupportedOperationException("Can't handle non-EE BioAssaySets yet");
}
}
return null;
}
use of ubic.gemma.model.expression.experiment.ExpressionExperiment in project Gemma by PavlidisLab.
the class ExpressionExperimentPlatformSwitchCli method doWork.
@Override
protected Exception doWork(String[] args) {
Exception exp = this.processCommandLine(args);
if (exp != null) {
return exp;
}
serv = this.getBean(ExpressionExperimentPlatformSwitchService.class);
for (BioAssaySet ee : expressionExperiments) {
if (ee instanceof ExpressionExperiment) {
this.processExperiment((ExpressionExperiment) ee);
} else {
throw new UnsupportedOperationException("Can't handle non-EE BioAssaySets yet");
}
}
this.summarizeProcessing();
return null;
}
use of ubic.gemma.model.expression.experiment.ExpressionExperiment in project Gemma by PavlidisLab.
the class VectorMergingCli method doWork.
@Override
protected Exception doWork(String[] args) {
Exception e = this.processCommandLine(args);
if (e != null) {
return e;
}
mergingService = this.getBean(VectorMergingService.class);
for (BioAssaySet ee : expressionExperiments) {
if (ee instanceof ExpressionExperiment) {
this.processExperiment((ExpressionExperiment) ee);
} else {
throw new UnsupportedOperationException("Can't do vector merging on non-expressionExperiment bioassaysets");
}
}
this.summarizeProcessing();
return null;
}
Aggregations