Class SampleCoexpressionAnalysisServiceImpl
- java.lang.Object
-
- ubic.gemma.persistence.service.analysis.expression.sampleCoexpression.SampleCoexpressionAnalysisServiceImpl
-
- All Implemented Interfaces:
SampleCoexpressionAnalysisService
@Service public class SampleCoexpressionAnalysisServiceImpl extends Object implements SampleCoexpressionAnalysisService
Manage the "sample correlation/coexpression" matrices.- Author:
- paul
-
-
Constructor Summary
Constructors Constructor Description SampleCoexpressionAnalysisServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DoubleMatrix<BioAssay,BioAssay>compute(ExpressionExperiment ee, PreparedCoexMatrices matrices)Unfortunately, this method breaks under high contention (see #400, so we need to fully lock the database while undergoing usingIsolation.SERIALIZABLEtransaction isolation level.booleanhasAnalysis(ExpressionExperiment ee)DoubleMatrix<BioAssay,BioAssay>loadBestMatrix(ExpressionExperiment ee)Loads the analysis containing the coexpression matrices for the given experiment and converts the regressed coexpression matrix into a double matrix.DoubleMatrix<BioAssay,BioAssay>loadFullMatrix(ExpressionExperiment ee)Loads the analysis containing the coexpression matrices for the given experiment and converts the full (non-regressed) coexpression matrix into a double matrix.DoubleMatrix<BioAssay,BioAssay>loadRegressedMatrix(ExpressionExperiment ee)Load the regressed coexpression matrix for the given experiment.PreparedCoexMatricesprepare(ExpressionExperiment ee)voidremoveForExperiment(ExpressionExperiment ee)Removes all coexpression matrices for the given experiment.DoubleMatrix<BioAssay,BioAssay>retrieveExisting(ExpressionExperiment ee)
-
-
-
Method Detail
-
loadFullMatrix
@Transactional(readOnly=true) public DoubleMatrix<BioAssay,BioAssay> loadFullMatrix(ExpressionExperiment ee)
Description copied from interface:SampleCoexpressionAnalysisServiceLoads the analysis containing the coexpression matrices for the given experiment and converts the full (non-regressed) coexpression matrix into a double matrix. If the analysis or the matrix does not exist, computes it.- Specified by:
loadFullMatrixin interfaceSampleCoexpressionAnalysisService- Parameters:
ee- the experiment to load the raw coexpression matrix for.- Returns:
- the full, non-regressed matrix. If the matrix is not available event after attempted computation, returns null.
-
loadRegressedMatrix
@Transactional(readOnly=true) public DoubleMatrix<BioAssay,BioAssay> loadRegressedMatrix(ExpressionExperiment ee)
Description copied from interface:SampleCoexpressionAnalysisServiceLoad the regressed coexpression matrix for the given experiment.- Specified by:
loadRegressedMatrixin interfaceSampleCoexpressionAnalysisService- Returns:
- the regressed matrix if available, null might indicate that the is either no analysis or no regressed
matrix, use
SampleCoexpressionAnalysisService.hasAnalysis(ExpressionExperiment)to tell these apart.
-
loadBestMatrix
@Transactional(readOnly=true) public DoubleMatrix<BioAssay,BioAssay> loadBestMatrix(ExpressionExperiment ee)
Description copied from interface:SampleCoexpressionAnalysisServiceLoads the analysis containing the coexpression matrices for the given experiment and converts the regressed coexpression matrix into a double matrix. If the analysis or the matrix does not exist, computes it. If there are problems loading or computing the regressed matrix (e.g. because the experiment has no experimental design), the full matrix is returned instead.- Specified by:
loadBestMatrixin interfaceSampleCoexpressionAnalysisService- Parameters:
ee- the experiment to load the regressed coexpression matrix for.- Returns:
- sample correlation matrix with major factors regressed out, if such matrix exists for the given experiment. If not, the full non-regressed matrix is returned. If no matrix is available event after attempted computation, returns null.
-
retrieveExisting
@Transactional(readOnly=true) public DoubleMatrix<BioAssay,BioAssay> retrieveExisting(ExpressionExperiment ee)
- Specified by:
retrieveExistingin interfaceSampleCoexpressionAnalysisService
-
prepare
@Transactional(readOnly=true) public PreparedCoexMatrices prepare(ExpressionExperiment ee)
- Specified by:
preparein interfaceSampleCoexpressionAnalysisService
-
compute
@Transactional(isolation=SERIALIZABLE) public DoubleMatrix<BioAssay,BioAssay> compute(ExpressionExperiment ee, PreparedCoexMatrices matrices)
Unfortunately, this method breaks under high contention (see #400, so we need to fully lock the database while undergoing usingIsolation.SERIALIZABLEtransaction isolation level. This annotation also has to be appled to other methods of this class that call compute() directly or indirectly. PP changed this to do more of the processing in a read-only transaction- Specified by:
computein interfaceSampleCoexpressionAnalysisService- Parameters:
ee- the experiment to create a sample correlation matrix for.- Returns:
- the regressed coexpression matrix if available, otherwise the full
-
hasAnalysis
@Transactional(readOnly=true) public boolean hasAnalysis(ExpressionExperiment ee)
- Specified by:
hasAnalysisin interfaceSampleCoexpressionAnalysisService
-
removeForExperiment
@Transactional public void removeForExperiment(ExpressionExperiment ee)
Description copied from interface:SampleCoexpressionAnalysisServiceRemoves all coexpression matrices for the given experiment.- Specified by:
removeForExperimentin interfaceSampleCoexpressionAnalysisService- Parameters:
ee- the experiment to remove the analysis for.
-
-