use of ubic.gemma.core.datastructure.matrix.ExpressionDataDoubleMatrix in project Gemma by PavlidisLab.
the class ExpressionDataSVDTest method testMatrixReconstructB.
/*
* Test on full-sized data set.
*/
@Test
public void testMatrixReconstructB() throws Exception {
GeoConverter gc = new GeoConverterImpl();
InputStream is = new GZIPInputStream(this.getClass().getResourceAsStream("/data/loader/expression/geo/fullSizeTests/GSE1623_family.soft.txt.gz"));
GeoFamilyParser parser = new GeoFamilyParser();
parser.parse(is);
GeoSeries series = ((GeoParseResult) parser.getResults().iterator().next()).getSeriesMap().get("GSE1623");
DatasetCombiner datasetCombiner = new DatasetCombiner();
GeoSampleCorrespondence correspondence = datasetCombiner.findGSECorrespondence(series);
series.setSampleCorrespondence(correspondence);
@SuppressWarnings("unchecked") Collection<ExpressionExperiment> result = (Collection<ExpressionExperiment>) gc.convert(series);
assertNotNull(result);
assertEquals(1, result.size());
ExpressionExperiment ee = result.iterator().next();
ExpressionDataDoubleMatrix matrix = new ExpressionDataDoubleMatrix(ee.getRawExpressionDataVectors(), ee.getQuantitationTypes().iterator().next());
svd = new ExpressionDataSVD(matrix, false);
ExpressionDataDoubleMatrix svdNormalize = svd.removeHighestComponents(1);
assertNotNull(svdNormalize);
}
Aggregations