use of ubic.gemma.model.expression.experiment.ExpressionExperiment 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.model.expression.experiment.ExpressionExperiment 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.model.expression.experiment.ExpressionExperiment 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.model.expression.experiment.ExpressionExperiment 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.model.expression.experiment.ExpressionExperiment 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());
}
Aggregations