use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testConvertGenePix.
@Test
public void testConvertGenePix() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/shortGenePix/GSE2221_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE2221");
DatasetCombiner datasetCombiner = new DatasetCombiner();
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 testConvertGSE60.
/*
* Was yielding a 'ArrayDesigns must be converted before datasets'.
*/
@SuppressWarnings("unchecked")
@Test
public void testConvertGSE60() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/gse60Short/GSE60_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/gse60Short/GDS75.soft.gz"));
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE60");
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();
assertEquals(133, ee.getBioAssays().size());
// used to be more but we reject mote qts now.
assertEquals(480, ee.getRawExpressionDataVectors().size());
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testConvertMultiTaxonPlatformGSE28843.
@SuppressWarnings("unchecked")
@Test
public void testConvertMultiTaxonPlatformGSE28843() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GSE28843.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE28843");
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());
Taxon primaryTaxon = ees.iterator().next().getBioAssays().iterator().next().getArrayDesignUsed().getPrimaryTaxon();
assertEquals("salmonid", primaryTaxon.getCommonName());
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testSplitByPlatform.
/*
* Test splitting
*/
@SuppressWarnings("unchecked")
@Test
public void testSplitByPlatform() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GSE493Short/GSE493_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE493");
DatasetCombiner datasetCombiner = new DatasetCombiner();
GeoSampleCorrespondence correspondence = datasetCombiner.findGSECorrespondence(series);
series.setSampleCorrespondence(correspondence);
this.gc.setSplitByPlatform(true);
Object result = this.gc.convert(series);
assertNotNull(result);
Collection<ExpressionExperiment> ees = (Collection<ExpressionExperiment>) result;
assertEquals(2, ees.size());
for (ExpressionExperiment ee : ees) {
// 4 on one platform, 10 on the other. This is a bit sloppy but good enuf for now.
assertTrue(ee.getBioAssays().size() == 4 || ee.getBioAssays().size() == 10);
}
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testConvertGSE8134.
/*
* NPE in converter, not reproduced here.
*/
@SuppressWarnings("unchecked")
@Test
public void testConvertGSE8134() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GSE8134_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE8134");
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());
}
Aggregations