Search in sources :

Example 1 with SampleCoexpressionAnalysis

use of ubic.gemma.model.analysis.expression.coexpression.SampleCoexpressionAnalysis in project Gemma by PavlidisLab.

the class SampleCoexpressionAnalysisDaoImpl method create.

@Override
public SampleCoexpressionAnalysis create(DoubleMatrix<BioAssay, BioAssay> matrix, BioAssayDimension bad, ExpressionExperiment ee) {
    /*
         * First remove any old ones for the experiment.
         */
    Collection<SampleCoexpressionAnalysis> old = this.findAnalysesByExperiment(ee);
    this.remove(old);
    SampleCoexpressionAnalysis sas = SampleCoexpressionAnalysis.Factory.newInstance();
    sas.setExperimentAnalyzed(ee);
    SampleCoexpressionMatrix scm = SampleCoexpressionMatrix.Factory.newInstance();
    scm.setBioAssayDimension(bad);
    byte[] coexpressionMatrix = SampleCoexpressionAnalysisDaoImpl.bac.doubleMatrixToBytes(matrix.getRawMatrix());
    scm.setCoexpressionMatrix(coexpressionMatrix);
    sas.setSampleCoexpressionMatrix(scm);
    this.getSessionFactory().getCurrentSession().save(sas);
    return sas;
}
Also used : SampleCoexpressionMatrix(ubic.gemma.model.analysis.expression.coexpression.SampleCoexpressionMatrix) SampleCoexpressionAnalysis(ubic.gemma.model.analysis.expression.coexpression.SampleCoexpressionAnalysis)

Aggregations

SampleCoexpressionAnalysis (ubic.gemma.model.analysis.expression.coexpression.SampleCoexpressionAnalysis)1 SampleCoexpressionMatrix (ubic.gemma.model.analysis.expression.coexpression.SampleCoexpressionMatrix)1