use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class DatasetCombinerTest method testFindGSE3193.
/*
* Has multiple platforms, but no GES's are defined
*/
@Test
public void testFindGSE3193() throws Exception {
GeoFamilyParser parser = new GeoFamilyParser();
try (InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GSE3193Short/GSE3193_family.soft.gz"))) {
parser.parse(is);
}
GeoParseResult parseResult = ((GeoParseResult) parser.getResults().iterator().next());
// GeoDataset gd = parseResult.getDatasets().values().iterator().next();
GeoSeries gse = parseResult.getSeries().values().iterator().next();
DatasetCombiner datasetCombiner = new DatasetCombiner();
GeoSampleCorrespondence result = datasetCombiner.findGSECorrespondence(gse);
DatasetCombinerTest.log.debug(result);
Iterator<Set<String>> it = result.iterator();
int numBioMaterials = 0;
while (it.hasNext()) {
it.next();
// assertTrue( c.size() == 1 );
numBioMaterials++;
}
// note, i'm not at all sure these are right! this used to be 60.
assertEquals(57, numBioMaterials);
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class DatasetCombinerTest method testFindGSE88.
@Test
public void testFindGSE88() throws Exception {
GeoFamilyParser parser = new GeoFamilyParser();
try (InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GSE88Short/GDS184.soft.gz"))) {
parser.parse(is);
}
try (InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GSE88Short/GSE88_family.soft.gz"))) {
parser.parse(is);
}
GeoParseResult parseResult = ((GeoParseResult) parser.getResults().iterator().next());
GeoDataset gd = parseResult.getDatasets().values().iterator().next();
GeoSeries gse = parseResult.getSeries().values().iterator().next();
gd.getSeries().add(gse);
gds = new HashSet<>();
gds.add(gd);
DatasetCombiner datasetCombiner = new DatasetCombiner();
GeoSampleCorrespondence result = datasetCombiner.findGSECorrespondence(gds);
DatasetCombinerTest.log.debug(result);
Iterator<Set<String>> it = result.iterator();
int numBioMaterials = 0;
while (it.hasNext()) {
Collection<String> c = it.next();
assertTrue(c.size() == 1);
numBioMaterials++;
}
assertEquals(31, numBioMaterials);
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testConvertGSE3791.
/*
* Has two species.
*/
@SuppressWarnings("unchecked")
@Test
public void testConvertGSE3791() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/gse3791Short/GSE3791_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE3791");
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(2, ees.size());
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testConvertWithLotsOfPlatforms.
@Test
public void testConvertWithLotsOfPlatforms() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/gse3500Short/GSE3500_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE3500");
DatasetCombiner datasetCombiner = new DatasetCombiner(false);
GeoSampleCorrespondence correspondence = datasetCombiner.findGSECorrespondence(series);
series.setSampleCorrespondence(correspondence);
Object result = this.gc.convert(series);
assertNotNull(result);
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method test5091.
/*
* quantitation type problem. See bug 1760
*/
@SuppressWarnings("unchecked")
@Test
public void test5091() 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();
for (QuantitationType qt : ee.getQuantitationTypes()) {
if (qt.getName().equals("VALUE")) {
assertEquals(PrimitiveType.DOUBLE, qt.getRepresentation());
return;
}
}
fail("Didn't find the 'value' quantitation type");
}
Aggregations