Search in sources :

Example 1 with TwoChannelMissingValues

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

the class ProcessedExpressionDataVectorServiceTest method getDataset.

private Collection<ExpressionExperiment> getDataset() throws Exception {
    // Dataset uses spotted arrays, 11 samples.
    ExpressionExperiment ee;
    try {
        geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath("gse432Short")));
        // noinspection unchecked
        Collection<ExpressionExperiment> results = (Collection<ExpressionExperiment>) geoService.fetchAndLoad("GSE432", false, true, false);
        ee = results.iterator().next();
        TwoChannelMissingValues tcmv = this.getBean(TwoChannelMissingValues.class);
        tcmv.computeMissingValues(ee, 1.5, null);
    // No masked preferred computation.
    } catch (AlreadyExistsInSystemException e) {
        if (e.getData() instanceof List) {
            ee = (ExpressionExperiment) ((List<?>) e.getData()).iterator().next();
        } else {
            ee = (ExpressionExperiment) e.getData();
        }
    } catch (Exception e) {
        if (e.getCause() instanceof IOException && e.getCause().getMessage().contains("502")) {
            return null;
        }
        throw e;
    }
    ee.setShortName(RandomStringUtils.randomAlphabetic(12));
    expressionExperimentService.update(ee);
    ee = expressionExperimentService.thawLite(ee);
    processedDataVectorService.createProcessedDataVectors(ee);
    Collection<ExpressionExperiment> e = new HashSet<>();
    e.add(ee);
    return e;
}
Also used : TwoChannelMissingValues(ubic.gemma.core.analysis.preprocess.TwoChannelMissingValues) Collection(java.util.Collection) List(java.util.List) AlreadyExistsInSystemException(ubic.gemma.core.loader.util.AlreadyExistsInSystemException) IOException(java.io.IOException) ExpressionExperiment(ubic.gemma.model.expression.experiment.ExpressionExperiment) AlreadyExistsInSystemException(ubic.gemma.core.loader.util.AlreadyExistsInSystemException) IOException(java.io.IOException) GeoDomainObjectGeneratorLocal(ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal) HashSet(java.util.HashSet)

Aggregations

IOException (java.io.IOException)1 Collection (java.util.Collection)1 HashSet (java.util.HashSet)1 List (java.util.List)1 TwoChannelMissingValues (ubic.gemma.core.analysis.preprocess.TwoChannelMissingValues)1 GeoDomainObjectGeneratorLocal (ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal)1 AlreadyExistsInSystemException (ubic.gemma.core.loader.util.AlreadyExistsInSystemException)1 ExpressionExperiment (ubic.gemma.model.expression.experiment.ExpressionExperiment)1