use of ubic.gemma.core.datastructure.matrix.ExpressionDataDoubleMatrix in project Gemma by PavlidisLab.
the class ExpressionDataSVDTest method testUMatrixAsExpressionData.
@Test
public void testUMatrixAsExpressionData() {
svd = new ExpressionDataSVD(testData, true);
ExpressionDataDoubleMatrix matrixAsExpressionData = svd.uMatrixAsExpressionData();
assertNotNull(matrixAsExpressionData);
}
use of ubic.gemma.core.datastructure.matrix.ExpressionDataDoubleMatrix in project Gemma by PavlidisLab.
the class ExpressionDataSVDTest method testWinnow.
@Test
public void testWinnow() {
ExpressionDataDoubleMatrix winnow = svd.winnow(0.5);
assertEquals(100, winnow.rows());
}
use of ubic.gemma.core.datastructure.matrix.ExpressionDataDoubleMatrix in project Gemma by PavlidisLab.
the class ExpressionDataFileServiceImpl method writeDataFile.
/**
* @param compress if true, file will be output in GZIP format.
*/
private File writeDataFile(ExpressionExperiment ee, boolean filtered, File f, boolean compress) throws IOException {
ExpressionDataFileServiceImpl.log.info("Creating new expression data file: " + f.getName());
ExpressionDataDoubleMatrix matrix = this.getDataMatrix(ee, filtered);
Collection<ArrayDesign> arrayDesigns = expressionExperimentService.getArrayDesignsUsed(ee);
Map<CompositeSequence, String[]> geneAnnotations = this.getGeneAnnotationsAsStringsByProbe(arrayDesigns);
this.writeMatrix(f, geneAnnotations, matrix, compress);
return f;
}
use of ubic.gemma.core.datastructure.matrix.ExpressionDataDoubleMatrix in project Gemma by PavlidisLab.
the class ExpressionDataFileServiceImpl method getDataMatrix.
private ExpressionDataDoubleMatrix getDataMatrix(ExpressionExperiment ee, boolean filtered) {
ee = expressionExperimentService.thawLite(ee);
ExpressionDataDoubleMatrix matrix;
if (filtered) {
FilterConfig filterConfig = new FilterConfig();
filterConfig.setIgnoreMinimumSampleThreshold(true);
filterConfig.setIgnoreMinimumRowsThreshold(true);
matrix = expressionDataMatrixService.getFilteredMatrix(ee, filterConfig);
} else {
matrix = expressionDataMatrixService.getProcessedExpressionDataMatrix(ee);
}
return matrix;
}
use of ubic.gemma.core.datastructure.matrix.ExpressionDataDoubleMatrix in project Gemma by PavlidisLab.
the class ExpressionDataFileServiceImpl method writeOrLocateJSONDataFile.
@Override
public File writeOrLocateJSONDataFile(ExpressionExperiment ee, boolean forceWrite, boolean filtered) {
try {
File f = this.getOutputFile(ee, filtered);
if (!forceWrite && f.canRead()) {
ExpressionDataFileServiceImpl.log.info(f + " exists, not regenerating");
return f;
}
ExpressionDataFileServiceImpl.log.info("Creating new JSON expression data file: " + f.getName());
ExpressionDataDoubleMatrix matrix = this.getDataMatrix(ee, filtered);
this.writeJson(f, matrix);
return f;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
Aggregations