use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.
the class GeoDatasetServiceTest method testFetchAndLoadGSE5949.
@Test
public void testFetchAndLoadGSE5949() throws Exception {
try {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath("GSE5949short")));
Collection<?> results = geoService.fetchAndLoad("GSE5949", false, true, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
log.info("Test skipped because GSE5949 was already loaded - clean the DB before running the test");
return;
}
ee = this.eeService.thawLite(ee);
Collection<QuantitationType> qts = eeService.getQuantitationTypes(ee);
assertEquals(1, qts.size());
}
use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.
the class GeoDatasetServiceTest method testFetchAndLoadGSE9048.
@Test
public void testFetchAndLoadGSE9048() throws Exception {
try {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath()));
Collection<?> results = geoService.fetchAndLoad("GSE9048", false, true, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
log.info("Test skipped because GSE9048 was already loaded - clean the DB before running the test");
return;
}
ee = eeService.load(ee.getId());
ee = this.eeService.thawLite(ee);
aclTestUtils.checkEEAcls(ee);
Collection<QuantitationType> qts = eeService.getQuantitationTypes(ee);
assertEquals(16, qts.size());
twoChannelMissingValues.computeMissingValues(ee);
ee = eeService.load(ee.getId());
ee = this.eeService.thawLite(ee);
qts = eeService.getQuantitationTypes(ee);
// 16 that were imported plus the detection call we added.
assertEquals(17, qts.size());
Collection<ProcessedExpressionDataVector> dataVectors = processedExpressionDataVectorService.computeProcessedExpressionData(ee);
assertEquals(10, dataVectors.size());
ee = eeService.load(ee.getId());
ee = this.eeService.thawLite(ee);
qts = eeService.getQuantitationTypes(ee);
assertEquals(18, qts.size());
File f = dataFileService.writeOrLocateDataFile(ee, true, true);
assertTrue(f.canRead());
assertTrue(f.length() > 0);
}
use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.
the class GeoDatasetServiceTest method testFetchAndLoadMultiChipPerSeriesShort.
@Test
public void testFetchAndLoadMultiChipPerSeriesShort() throws Exception {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath("shortTest")));
/*
* HG-U133A. GDS473 is for the other chip (B). Series is GSE674. see
* http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=gds&term=GSE674[Accession]&cmd=search
*/
ExpressionExperiment newee;
try {
Collection<?> results = geoService.fetchAndLoad("GSE674", false, true, false);
newee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
log.info("Skipping test, data already exists in db");
return;
}
assertNotNull(newee);
newee = eeService.thaw(newee);
/*
* Test for bug 468 (merging of subsets across GDS's)
*/
ExperimentalFactor factor = newee.getExperimentalDesign().getExperimentalFactors().iterator().next();
// otherwise get 4.
assertEquals(2, factor.getFactorValues().size());
Collection<RawExpressionDataVector> vectors = newee.getRawExpressionDataVectors();
rawExpressionDataVectorService.thaw(vectors);
ExpressionDataMatrixBuilder builder = new ExpressionDataMatrixBuilder(vectors);
ExpressionDataMatrix<Double> matrix = builder.getPreferredData();
assertNotNull(matrix);
assertEquals(31, matrix.rows());
assertEquals(15, matrix.columns());
// GSM10363 = D1-U133B
this.testMatrixValue(newee, matrix, "200000_s_at", "GSM10363", 5722.0);
// GSM10380 = C7-U133A
this.testMatrixValue(newee, matrix, "1007_s_at", "GSM10380", 1272.0);
}
use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.
the class GeoDatasetServiceTest method testFetchAndLoadGSE18707.
/*
* For bug 2312 - qts getting dropped.
*/
@Test
public void testFetchAndLoadGSE18707() throws Exception {
try {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath()));
Collection<?> results = geoService.fetchAndLoad("GSE18707", false, true, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
log.info("Test skipped because GSE18707 was already loaded - clean the DB before running the test");
return;
}
// Mouse430A_2.
ee = eeService.findByShortName("GSE18707");
aclTestUtils.checkEEAcls(ee);
Collection<QuantitationType> qts = eeService.getQuantitationTypes(ee);
assertEquals(1, qts.size());
QuantitationType qt = qts.iterator().next();
assertEquals("Processed Affymetrix Rosetta intensity values", qt.getDescription());
Collection<ProcessedExpressionDataVector> dataVectors = processedExpressionDataVectorService.computeProcessedExpressionData(ee);
assertEquals(100, dataVectors.size());
ee = eeService.findByShortName("GSE18707");
qts = eeService.getQuantitationTypes(ee);
assertEquals(2, qts.size());
}
use of ubic.gemma.core.loader.expression.geo.GeoDomainObjectGeneratorLocal in project Gemma by PavlidisLab.
the class ExperimentalDesignImporterTestC method setup.
@Before
public void setup() throws Exception {
/*
* Have to add ssal for this platform.
*/
super.executeSqlScript("/script/sql/add-fish-taxa.sql", false);
Taxon salmon = taxonService.findByCommonName("atlantic salmon");
assertNotNull(salmon);
/*
* Load the array design (platform).
*/
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGeneratorLocal(this.getTestFileBasePath("designLoadTests")));
geoService.fetchAndLoad("GPL2899", true, true, false);
ArrayDesign ad = arrayDesignService.findByShortName("GPL2899");
assertNotNull(ad);
SimpleExpressionExperimentMetaData metaData = new SimpleExpressionExperimentMetaData();
metaData.setShortName(RandomStringUtils.randomAlphabetic(10));
metaData.setDescription("bar");
metaData.setIsRatio(false);
metaData.setTaxon(salmon);
metaData.setQuantitationTypeName("value");
metaData.setScale(ScaleType.LOG2);
metaData.setType(StandardQuantitationType.AMOUNT);
metaData.getArrayDesigns().add(ad);
try (InputStream data = this.getClass().getResourceAsStream("/data/loader/expression/geo/designLoadTests/expressionDataBrain2003TestFile.txt")) {
ee = simpleExpressionDataLoaderService.create(metaData, data);
}
// ee = this.eeService.thawLite( ee );
}
Aggregations