use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testParseGSE44625.
/*
* bug 3415. The samples do not have the same quantitation types. In some it is "detection pval" and others
* "raw_value". We would reject "detection pval" but if the qt already has the name "raw_value" we won't. The way
* the current setup works, we sort of throw up our hands and keep the data, even though it is messed up.
* <p>
* This tests that behaviour. If we start rejecting the data, this test will fail (note that rejecting the data is
* not unreasonable).
*/
@Test
public void testParseGSE44625() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GSE44625.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoParseResult result = (GeoParseResult) parser.getResults().iterator().next();
GeoSeries series = result.getSeries().values().iterator().next();
DatasetCombiner datasetCombiner = new DatasetCombiner(false);
GeoSampleCorrespondence correspondence = datasetCombiner.findGSECorrespondence(series);
series.setSampleCorrespondence(correspondence);
Object convert = this.gc.convert(series);
ExpressionExperiment ee = (ExpressionExperiment) ((Collection<?>) convert).iterator().next();
assertEquals(2, ee.getQuantitationTypes().size());
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testConvertGSE2122SAGE.
// No SAGE allowed
@SuppressWarnings("unchecked")
@Test
public void testConvertGSE2122SAGE() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/gse2122shortSage/GSE2122.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE2122");
DatasetCombiner datasetCombiner = new DatasetCombiner();
GeoSampleCorrespondence correspondence = datasetCombiner.findGSECorrespondence(series);
series.setSampleCorrespondence(correspondence);
Object result = this.gc.convert(series);
Collection<ExpressionExperiment> ees = (Collection<ExpressionExperiment>) result;
// SAGE, rejected
assertEquals(0, ees.size());
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testConvertGSE2982.
@SuppressWarnings("unchecked")
@Test
public void testConvertGSE2982() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/gse2982Short/GSE2982_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE2982");
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();
boolean ok = false;
for (RawExpressionDataVector dedv : ee.getRawExpressionDataVectors()) {
QuantitationType qt = dedv.getQuantitationType();
if (qt.getIsPreferred()) {
ok = true;
assertEquals("VALUE", qt.getName());
assertEquals(StandardQuantitationType.AMOUNT, qt.getType());
assertTrue(qt.getIsRatio());
}
}
assertTrue(ok);
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testFetchAndLoadGSE8294.
/*
* Ends up with too few vectors, because of a problem with the quantitation type guesser.
*/
@Test
public void testFetchAndLoadGSE8294() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GSE8294_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE8294");
DatasetCombiner datasetCombiner = new DatasetCombiner(false);
GeoSampleCorrespondence correspondence = datasetCombiner.findGSECorrespondence(series);
series.setSampleCorrespondence(correspondence);
Set<?> result = (Set<?>) this.gc.convert(series);
ExpressionExperiment e = (ExpressionExperiment) result.iterator().next();
assertEquals(66, e.getRawExpressionDataVectors().size());
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testConvertGSE106.
/*
* caused "GSM3059 had no platform assigned"
*
*/
@Test
public void testConvertGSE106() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/gse106Short/GSE106.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE106");
DatasetCombiner datasetCombiner = new DatasetCombiner();
GeoSampleCorrespondence correspondence = datasetCombiner.findGSECorrespondence(series);
series.setSampleCorrespondence(correspondence);
Object result = this.gc.convert(series);
assertNotNull(result);
}
Aggregations