Search in sources :

Example 31 with GeoDomainObjectGeneratorLocal

use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.

the class GeoDatasetServiceTest method testFetchAndLoadGSE1133.

/*
     * Has multiple species (mouse and human, one and two platforms respectively), also test publication entry.
     */
@Test
public void testFetchAndLoadGSE1133() throws Exception {
    geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath("gse1133Short")));
    Collection<?> results;
    try {
        results = geoService.fetchAndLoad("GSE1133", false, true, false);
    } catch (AlreadyExistsInSystemException e) {
        log.warn("Test skipped because GSE1133 was not removed from the system prior to test");
        return;
    }
    assertEquals(2, results.size());
    for (Object o : results) {
        ExpressionExperiment e = (ExpressionExperiment) o;
        e = eeService.thawLite(e);
        aclTestUtils.checkEEAcls(e);
        assertNotNull(e.getPrimaryPublication());
        assertEquals("6062-7", e.getPrimaryPublication().getPages());
        try {
            eeService.remove(e);
        } catch (Exception ex) {
            log.info("Failed to remove EE after test");
        }
    }
}
Also used : AlreadyExistsInSystemException(ubic.gemma.core.loader.util.AlreadyExistsInSystemException) ExpressionExperiment(ubic.gemma.model.expression.experiment.ExpressionExperiment) AlreadyExistsInSystemException(ubic.gemma.core.loader.util.AlreadyExistsInSystemException) GeoDomainObjectGeneratorLocal(ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal) AbstractGeoServiceTest(ubic.gemma.core.loader.expression.geo.AbstractGeoServiceTest) Test(org.junit.Test)

Example 32 with GeoDomainObjectGeneratorLocal

use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.

the class GeoDatasetServiceTest method testLoadGSE30521ExonArray.

@Test
public void testLoadGSE30521ExonArray() throws Exception {
    try {
        geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath()));
        Collection<?> results = geoService.fetchAndLoad("GSE30521", false, true, false);
        ee = (ExpressionExperiment) results.iterator().next();
    } catch (AlreadyExistsInSystemException e) {
        log.info("Test skipped because GSE30521 was already loaded - clean the DB before running the test");
        return;
    }
    ee = this.eeService.thawLite(ee);
    /*
         * Should load okay, but should not load the data.
         */
    try {
        processedExpressionDataVectorService.computeProcessedExpressionData(ee);
        fail("Should not have any data vectors for exon arrays on first loading");
    } catch (Exception e) {
    // OK
    }
}
Also used : AlreadyExistsInSystemException(ubic.gemma.core.loader.util.AlreadyExistsInSystemException) AlreadyExistsInSystemException(ubic.gemma.core.loader.util.AlreadyExistsInSystemException) GeoDomainObjectGeneratorLocal(ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal) AbstractGeoServiceTest(ubic.gemma.core.loader.expression.geo.AbstractGeoServiceTest) Test(org.junit.Test)

Example 33 with GeoDomainObjectGeneratorLocal

use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.

the class GeoDatasetServiceTest method testFetchAndLoadGSE37646RNASEQ.

@Test
public void testFetchAndLoadGSE37646RNASEQ() throws Exception {
    geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath()));
    try {
        Collection<?> results = geoService.fetchAndLoad("GSE37646", false, true, false);
        ee = (ExpressionExperiment) results.iterator().next();
        aclTestUtils.checkEEAcls(ee);
    } catch (AlreadyExistsInSystemException e) {
        log.warn("Test skipped because GSE1133 was not removed from the system prior to test");
    }
}
Also used : AlreadyExistsInSystemException(ubic.gemma.core.loader.util.AlreadyExistsInSystemException) GeoDomainObjectGeneratorLocal(ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal) AbstractGeoServiceTest(ubic.gemma.core.loader.expression.geo.AbstractGeoServiceTest) Test(org.junit.Test)

Example 34 with GeoDomainObjectGeneratorLocal

use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.

the class GeoDatasetServiceTest method testFetchAndLoadGSE12135EXON.

@Test
public void testFetchAndLoadGSE12135EXON() throws Exception {
    geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath()));
    try {
        Collection<?> results = geoService.fetchAndLoad("GSE12135", false, true, false);
        ee = (ExpressionExperiment) results.iterator().next();
        aclTestUtils.checkEEAcls(ee);
    } catch (AlreadyExistsInSystemException e) {
        log.warn("Test skipped because GSE1133 was not removed from the system prior to test");
    }
}
Also used : AlreadyExistsInSystemException(ubic.gemma.core.loader.util.AlreadyExistsInSystemException) GeoDomainObjectGeneratorLocal(ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal) AbstractGeoServiceTest(ubic.gemma.core.loader.expression.geo.AbstractGeoServiceTest) Test(org.junit.Test)

Example 35 with GeoDomainObjectGeneratorLocal

use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.

the class GeoDatasetServiceTest method testLoadGSE28383ExonArray.

@Test
public void testLoadGSE28383ExonArray() throws Exception {
    try {
        geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath()));
        Collection<?> results = geoService.fetchAndLoad("GSE28383", false, true, false);
        ee = (ExpressionExperiment) results.iterator().next();
    } catch (AlreadyExistsInSystemException e) {
        log.info("Test skipped because GSE28383 was already loaded - clean the DB before running the test");
        return;
    }
    ee = this.eeService.thawLite(ee);
    /*
         * Should load okay, even though it has no data. See bug 3981.
         */
    try {
        processedExpressionDataVectorService.computeProcessedExpressionData(ee);
        fail("Should not have any data vectors for exon arrays on first loading");
    } catch (Exception e) {
    // OK
    }
}
Also used : AlreadyExistsInSystemException(ubic.gemma.core.loader.util.AlreadyExistsInSystemException) AlreadyExistsInSystemException(ubic.gemma.core.loader.util.AlreadyExistsInSystemException) GeoDomainObjectGeneratorLocal(ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal) AbstractGeoServiceTest(ubic.gemma.core.loader.expression.geo.AbstractGeoServiceTest) Test(org.junit.Test)

Aggregations

GeoDomainObjectGeneratorLocal (ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal)45 AlreadyExistsInSystemException (ubic.gemma.core.loader.util.AlreadyExistsInSystemException)33 Test (org.junit.Test)30 AbstractGeoServiceTest (ubic.gemma.core.loader.expression.geo.AbstractGeoServiceTest)30 ExpressionExperiment (ubic.gemma.model.expression.experiment.ExpressionExperiment)23 Collection (java.util.Collection)13 Before (org.junit.Before)13 HashSet (java.util.HashSet)10 ExperimentalFactor (ubic.gemma.model.expression.experiment.ExperimentalFactor)10 ProcessedExpressionDataVector (ubic.gemma.model.expression.bioAssayData.ProcessedExpressionDataVector)8 InputStream (java.io.InputStream)7 List (java.util.List)7 ArrayDesign (ubic.gemma.model.expression.arrayDesign.ArrayDesign)7 BioAssay (ubic.gemma.model.expression.bioAssay.BioAssay)7 QuantitationType (ubic.gemma.model.common.quantitationtype.QuantitationType)6 File (java.io.File)4 RawExpressionDataVector (ubic.gemma.model.expression.bioAssayData.RawExpressionDataVector)4 BioMaterial (ubic.gemma.model.expression.biomaterial.BioMaterial)4 CompositeSequence (ubic.gemma.model.expression.designElement.CompositeSequence)4 ExpressionDataDoubleMatrix (ubic.gemma.core.datastructure.matrix.ExpressionDataDoubleMatrix)3