use of ubic.gemma.core.loader.expression.geo.model.GeoDataset in project Gemma by PavlidisLab.
the class DatasetCombinerTest method testGDS186.
/*
* This has just a single data set but results in a "no platform assigned" error.
*/
@Test
public void testGDS186() throws Exception {
GeoFamilyParser parser = new GeoFamilyParser();
try (InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/gse106Short/GDS186.soft.gz"))) {
parser.parse(is);
}
try (InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/gse106Short/GSE106.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(11, numBioMaterials);
}
use of ubic.gemma.core.loader.expression.geo.model.GeoDataset 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);
}
Aggregations