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)booleanhasPca(ExpressionExperiment ee)static voidpopulateBMFMap(Map<ExperimentalFactor,Map<Long,Double>> bioMaterialFactorMap, BioMaterial bm)Retrieve relationships between factors, biomaterials and factor values.SVDValueObjectretrieveSvd(ExpressionExperiment ee)Get the SVD information for experiment with id given.SVDValueObjectsvd(ExpressionExperiment ee)SVDValueObjectsvdFactorAnalysis(PrincipalComponentAnalysis pca)Compare ExperimentalFactors and BioAssay.processingDates to the PCs.SVDValueObjectsvdFactorAnalysis(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
Doubleif 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:
retrieveSvdin interfaceSVDServiceHelper- Returns:
- value or null if there isn't one.
-
svd
@Transactional public SVDValueObject svd(ExpressionExperiment ee) throws SVDException
- Specified by:
svdin interfaceSVDServiceHelper- Throws:
SVDException
-
getTopLoadedVectors
@Transactional(readOnly=true) public Map<ProbeLoading,DoubleVectorValueObject> getTopLoadedVectors(ExpressionExperiment ee, int component, int count)
- Specified by:
getTopLoadedVectorsin interfaceSVDServiceHelper
-
hasPca
@Transactional(readOnly=true) public boolean hasPca(ExpressionExperiment ee)
- Specified by:
hasPcain interfaceSVDServiceHelper
-
getImportantFactors
@Transactional(readOnly=true) public Set<ExperimentalFactor> getImportantFactors(ExpressionExperiment ee, Collection<ExperimentalFactor> experimentalFactors, Double importanceThreshold)
- Specified by:
getImportantFactorsin 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:SVDServiceHelperCompare ExperimentalFactors and BioAssay.processingDates to the PCs.- Specified by:
svdFactorAnalysisin interfaceSVDServiceHelper- Parameters:
pca- PCA- Returns:
- SVD VO
-
svdFactorAnalysis
@Transactional(readOnly=true) public SVDValueObject svdFactorAnalysis(ExpressionExperiment ee)
Description copied from interface:SVDServiceHelperCompare ExperimentalFactors and BioAssay.processingDates to the PCs.- Specified by:
svdFactorAnalysisin interfaceSVDServiceHelper- Parameters:
ee- the experiment- Returns:
- SVD VO
-
-