use of ubic.gemma.model.expression.experiment.BioAssaySet 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.BioAssaySet 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.BioAssaySet in project Gemma by PavlidisLab.
the class ExpressionDataMatrixWriterCLI method doWork.
@Override
protected Exception doWork(String[] args) {
Exception err = this.processCommandLine(args);
if (err != null)
return err;
ExpressionDataFileService fs = this.getBean(ExpressionDataFileService.class);
if (expressionExperiments.size() > 1 && StringUtils.isNotBlank(outFileName)) {
throw new IllegalArgumentException("Output file name can only be used for single experiment output");
}
for (BioAssaySet ee : expressionExperiments) {
String fileName;
if (StringUtils.isNotBlank(outFileName)) {
fileName = outFileName;
} else {
fileName = FileTools.cleanForFileName(((ExpressionExperiment) ee).getShortName()) + ".txt";
}
try {
fs.writeDataFile((ExpressionExperiment) ee, filter, fileName, false);
} catch (IOException e) {
this.errorObjects.add(ee + ": " + e);
}
}
return null;
}
use of ubic.gemma.model.expression.experiment.BioAssaySet 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.BioAssaySet 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