use of ubic.gemma.model.expression.experiment.ExpressionExperiment in project Gemma by PavlidisLab.
the class GeoConverterTest method testConvertGSE5091.
/*
* Problem with QT being interpreted as String instead of Double.
*/
@SuppressWarnings("unchecked")
@Test
public void testConvertGSE5091() throws Exception {
GeoFamilyParser parser = new GeoFamilyParser();
try (InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GSE5091Short/GSE5091_family.soft.gz"))) {
parser.parse(is);
}
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE5091");
DatasetCombiner datasetCombiner = new DatasetCombiner();
GeoSampleCorrespondence correspondence = datasetCombiner.findGSECorrespondence(series);
series.setSampleCorrespondence(correspondence);
Object result = this.gc.convert(series);
assertNotNull(result);
Collection<ExpressionExperiment> ees = (Collection<ExpressionExperiment>) result;
assertEquals(1, ees.size());
ExpressionExperiment ee = ees.iterator().next();
Collection<QuantitationType> quantitationTypes = ee.getQuantitationTypes();
for (QuantitationType quantitationType : quantitationTypes) {
// log.info(quantitationType);
if (quantitationType.getName().equals("VALUE")) {
/*
* Here's the problem. Of course it works fine...
*/
assertEquals(PrimitiveType.DOUBLE, quantitationType.getRepresentation());
assertTrue(quantitationType.getIsPreferred());
return;
}
}
fail("Expected to find 'VALUE' with type Double");
}
use of ubic.gemma.model.expression.experiment.ExpressionExperiment in project Gemma by PavlidisLab.
the class ExpressionExperimentBibRefFinderTest method testLocatePrimaryReference.
@Test
public void testLocatePrimaryReference() throws Exception {
ExpressionExperimentBibRefFinder finder = new ExpressionExperimentBibRefFinder();
ExpressionExperiment ee = ExpressionExperiment.Factory.newInstance();
DatabaseEntry de = DatabaseEntry.Factory.newInstance();
ExternalDatabase ed = ExternalDatabase.Factory.newInstance();
ed.setName("GEO");
de.setAccession("GSE3023");
de.setExternalDatabase(ed);
ee.setAccession(de);
try {
BibliographicReference bibref = null;
for (int i = 0; i < 3; i++) {
bibref = finder.locatePrimaryReference(ee);
if (bibref != null)
break;
Thread.sleep(1000);
}
assertNotNull(bibref);
assertEquals("Differential gene expression in anatomical compartments of the human eye.", bibref.getTitle());
} catch (Exception e) {
checkCause(e);
}
}
use of ubic.gemma.model.expression.experiment.ExpressionExperiment in project Gemma by PavlidisLab.
the class ExpressionExperimentBibRefFinderTest method testLocatePrimaryReferenceInvalidGSE.
@Test
public void testLocatePrimaryReferenceInvalidGSE() throws Exception {
ExpressionExperimentBibRefFinder finder = new ExpressionExperimentBibRefFinder();
ExpressionExperiment ee = ExpressionExperiment.Factory.newInstance();
DatabaseEntry de = DatabaseEntry.Factory.newInstance();
ExternalDatabase ed = ExternalDatabase.Factory.newInstance();
ed.setName("GEO");
de.setAccession("GSE30231111111111111");
de.setExternalDatabase(ed);
ee.setAccession(de);
try {
BibliographicReference bibref = finder.locatePrimaryReference(ee);
assert (bibref == null);
} catch (Exception e) {
checkCause(e);
}
}
use of ubic.gemma.model.expression.experiment.ExpressionExperiment in project Gemma by PavlidisLab.
the class ExonArrayDataAddIntegrationTest method testAddAffyExonRat.
@Test
public void testAddAffyExonRat() {
if (!hasApt) {
log.warn("Test skipped due to lack of Affy Power Tools executable");
return;
}
// GSE33597
ExpressionExperiment ee;
try {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGenerator());
Collection<?> results = geoService.fetchAndLoad("GSE33597", false, false, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
ee = (ExpressionExperiment) ((List<?>) e.getData()).get(0);
}
dataUpdater.addAffyExonArrayData(ee);
experimentService.load(ee.getId());
}
use of ubic.gemma.model.expression.experiment.ExpressionExperiment in project Gemma by PavlidisLab.
the class ExonArrayDataAddIntegrationTest method testAddAffyExonHuman.
@Test
public void testAddAffyExonHuman() {
if (!hasApt) {
log.warn("Test skipped due to lack of Affy Power Tools executable");
return;
}
// GSE22498
ExpressionExperiment ee;
try {
geoService.setGeoDomainObjectGenerator(new GeoDomainObjectGenerator());
Collection<?> results = geoService.fetchAndLoad("GSE22498", false, false, false);
ee = (ExpressionExperiment) results.iterator().next();
} catch (AlreadyExistsInSystemException e) {
ee = (ExpressionExperiment) ((List<?>) e.getData()).get(0);
}
dataUpdater.addAffyExonArrayData(ee);
experimentService.load(ee.getId());
}
Aggregations