use of ubic.gemma.model.analysis.expression.diff.PvalueDistribution in project Gemma by PavlidisLab.
the class DifferentialExpressionAnalyzerServiceImpl method addPvalueDistribution.
private void addPvalueDistribution(ExpressionAnalysisResultSet resultSet) {
Histogram pvalHist = new Histogram("", 100, 0.0, 1.0);
for (DifferentialExpressionAnalysisResult result : resultSet.getResults()) {
Double pvalue = result.getPvalue();
if (pvalue != null)
pvalHist.fill(pvalue);
}
PvalueDistribution pvd = PvalueDistribution.Factory.newInstance();
pvd.setNumBins(100);
ByteArrayConverter bac = new ByteArrayConverter();
pvd.setBinCounts(bac.doubleArrayToBytes(pvalHist.getArray()));
// do not save yet.
resultSet.setPvalueDistribution(pvd);
}
Aggregations