Class SVDServiceHelperImpl
- java.lang.Object
-
- ubic.gemma.core.analysis.preprocess.svd.SVDServiceHelperImpl
-
- All Implemented Interfaces:
SVDServiceHelper
@Service public class SVDServiceHelperImpl extends Object implements SVDServiceHelper
Perform SVD on expression data and store the results.- Author:
- paul
- See Also:
PrincipalComponentAnalysisService
-
-
Constructor Summary
Constructors Constructor Description SVDServiceHelperImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<ExperimentalFactor>
getImportantFactors(ExpressionExperiment ee, Collection<ExperimentalFactor> experimentalFactors, Double importanceThreshold)
Map<ProbeLoading,DoubleVectorValueObject>
getTopLoadedVectors(ExpressionExperiment ee, int component, int count)
boolean
hasPca(ExpressionExperiment ee)
static void
populateBMFMap(Map<ExperimentalFactor,Map<Long,Double>> bioMaterialFactorMap, BioMaterial bm)
Retrieve relationships between factors, biomaterials and factor values.SVDValueObject
retrieveSvd(ExpressionExperiment ee)
Get the SVD information for experiment with id given.SVDValueObject
svd(ExpressionExperiment ee)
SVDValueObject
svdFactorAnalysis(PrincipalComponentAnalysis pca)
Compare ExperimentalFactors and BioAssay.processingDates to the PCs.SVDValueObject
svdFactorAnalysis(ExpressionExperiment ee)
Compare ExperimentalFactors and BioAssay.processingDates to the PCs.
-
-
-
Method Detail
-
populateBMFMap
public static void populateBMFMap(Map<ExperimentalFactor,Map<Long,Double>> bioMaterialFactorMap, BioMaterial bm)
Retrieve relationships between factors, biomaterials and factor values.Continuous factor values are converted to a
Double
if possible, otherwise theFactorValue.getId()
is used. This is the case for categorical measurement.- Parameters:
bioMaterialFactorMap
- to be populated, of experimental factor -> biomaterial ID -> factor value (double value if possible otherwise ID)bm
- to populate for
-
retrieveSvd
@Transactional(readOnly=true) public SVDValueObject retrieveSvd(ExpressionExperiment ee)
Get the SVD information for experiment with id given.- Specified by:
retrieveSvd
in interfaceSVDServiceHelper
- Returns:
- value or null if there isn't one.
-
svd
@Transactional public SVDValueObject svd(ExpressionExperiment ee) throws SVDException
- Specified by:
svd
in interfaceSVDServiceHelper
- Throws:
SVDException
-
getTopLoadedVectors
@Transactional(readOnly=true) public Map<ProbeLoading,DoubleVectorValueObject> getTopLoadedVectors(ExpressionExperiment ee, int component, int count)
- Specified by:
getTopLoadedVectors
in interfaceSVDServiceHelper
-
hasPca
@Transactional(readOnly=true) public boolean hasPca(ExpressionExperiment ee)
- Specified by:
hasPca
in interfaceSVDServiceHelper
-
getImportantFactors
@Transactional(readOnly=true) public Set<ExperimentalFactor> getImportantFactors(ExpressionExperiment ee, Collection<ExperimentalFactor> experimentalFactors, Double importanceThreshold)
- Specified by:
getImportantFactors
in interfaceSVDServiceHelper
- Parameters:
ee
- the expression experimentexperimentalFactors
- to considerimportanceThreshold
- threshold for pvalue of association with factor. Suggested value might be 0.01.- Returns:
- factors which are "significantly" associated with one of the first three PCs
-
svdFactorAnalysis
@Transactional(readOnly=true) public SVDValueObject svdFactorAnalysis(PrincipalComponentAnalysis pca)
Description copied from interface:SVDServiceHelper
Compare ExperimentalFactors and BioAssay.processingDates to the PCs.- Specified by:
svdFactorAnalysis
in interfaceSVDServiceHelper
- Parameters:
pca
- PCA- Returns:
- SVD VO
-
svdFactorAnalysis
@Transactional(readOnly=true) public SVDValueObject svdFactorAnalysis(ExpressionExperiment ee)
Description copied from interface:SVDServiceHelper
Compare ExperimentalFactors and BioAssay.processingDates to the PCs.- Specified by:
svdFactorAnalysis
in interfaceSVDServiceHelper
- Parameters:
ee
- the experiment- Returns:
- SVD VO
-
-