Search in sources :

Example 1 with ExpressionExperimentSetService

use of ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentSetService in project Gemma by PavlidisLab.

the class ExpressionExperimentManipulatingCLI method experimentsFromEeSet.

private void experimentsFromEeSet(String optionValue) {
    if (StringUtils.isBlank(optionValue)) {
        throw new IllegalArgumentException("Please provide an eeset name");
    }
    ExpressionExperimentSetService expressionExperimentSetService = this.getBean(ExpressionExperimentSetService.class);
    Collection<ExpressionExperimentSet> sets = expressionExperimentSetService.findByName(optionValue);
    if (sets.size() > 1) {
        throw new IllegalArgumentException("More than on EE set has name '" + optionValue + "'");
    } else if (sets.size() == 0) {
        throw new IllegalArgumentException("No EE set has name '" + optionValue + "'");
    }
    ExpressionExperimentSet set = sets.iterator().next();
    this.expressionExperiments = new HashSet<>(set.getExperiments());
}
Also used : ExpressionExperimentSetService(ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentSetService) ExpressionExperimentSet(ubic.gemma.model.analysis.expression.ExpressionExperimentSet)

Aggregations

ExpressionExperimentSet (ubic.gemma.model.analysis.expression.ExpressionExperimentSet)1 ExpressionExperimentSetService (ubic.gemma.persistence.service.expression.experiment.ExpressionExperimentSetService)1