use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testConvertGSE404.
/*
* Gets no 'preferred' quantitation type. - it should find one.
*/
@SuppressWarnings("unchecked")
@Test
public void testConvertGSE404() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/gse404Short/GSE404_family.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE404");
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;
ExpressionExperiment ee = ees.iterator().next();
boolean ok = this.checkQts(ee);
assertTrue(ok);
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testConvertGSE4229IMAGE.
/*
* See bug 3328 - we don't want to use IMAGE clone IDs
*/
@Test
public void testConvertGSE4229IMAGE() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/gse4229Short/GSE4229.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE4229");
DatasetCombiner datasetCombiner = new DatasetCombiner();
GeoSampleCorrespondence correspondence = datasetCombiner.findGSECorrespondence(series);
series.setSampleCorrespondence(correspondence);
Object result = this.gc.convert(series);
assertNotNull(result);
@SuppressWarnings("unchecked") Collection<ExpressionExperiment> ees = (Collection<ExpressionExperiment>) result;
ExpressionExperiment ee = ees.iterator().next();
ArrayDesign platform = ee.getBioAssays().iterator().next().getArrayDesignUsed();
BioSequence seq = platform.getCompositeSequences().iterator().next().getBiologicalCharacteristic();
assertNotNull(seq.getSequenceDatabaseEntry());
String acc = seq.getSequenceDatabaseEntry().getAccession();
assertEquals("Genbank", seq.getSequenceDatabaseEntry().getExternalDatabase().getName());
assertTrue(!acc.startsWith("IMAGE"));
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoConverterTest method testGSE44903.
/*
* bug 3393/1709 - case change in probe names messing things up.
*/
@Test
public final void testGSE44903() throws Exception {
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GSE44903.soft.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE44903");
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();
/*
* This is the current condition, because the probes are not matched up.
*/
assertEquals(0, e.getRawExpressionDataVectors().size());
}
use of ubic.gemma.core.loader.expression.geo.model.GeoSeries 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.core.loader.expression.geo.model.GeoSeries in project Gemma by PavlidisLab.
the class GeoFamilyParserTest method testParseGSE29014.
/*
* Lacks data for some samples (on purpose)
*/
@Test
public void testParseGSE29014() throws Exception {
is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/GSE29014.soft.gz"));
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE29014");
Assert.assertEquals(78, series.getSamples().size());
}
Aggregations