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 -
Method Summary
Modifier and TypeMethodDescriptioncompute(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.booleanLoads the analysis containing the coexpression matrices for the given experiment and converts the regressed coexpression matrix into a double matrix.Loads the analysis containing the coexpression matrices for the given experiment and converts the full (non-regressed) coexpression matrix into a double matrix.Load the regressed coexpression matrix for the given experiment.voidRemoves all coexpression matrices for the given experiment.
-
Constructor Details
-
SampleCoexpressionAnalysisServiceImpl
public SampleCoexpressionAnalysisServiceImpl()
-
-
Method Details
-
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) throws FilteringException - Specified by:
preparein interfaceSampleCoexpressionAnalysisService- Throws:
FilteringException
-
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
- Specified by:
hasAnalysisin interfaceSampleCoexpressionAnalysisService
-
removeForExperiment
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.
-