Class ExpressionExperimentBatchCorrectionServiceImpl
- java.lang.Object
-
- ubic.gemma.core.analysis.preprocess.batcheffects.ExpressionExperimentBatchCorrectionServiceImpl
-
- All Implemented Interfaces:
ExpressionExperimentBatchCorrectionService
@Component public class ExpressionExperimentBatchCorrectionServiceImpl extends Object implements ExpressionExperimentBatchCorrectionService
Methods for correcting batch effects.- Author:
- paul
-
-
Field Summary
Fields Modifier and Type Field Description static String
COLLECTION_OF_MATERIAL_URI
static String
DE_EXCLUDE_URI
static String
DE_INCLUDE_URI
-
Constructor Summary
Constructors Constructor Description ExpressionExperimentBatchCorrectionServiceImpl()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
checkCorrectability(ExpressionExperiment ee)
Is there a Batch factor provided? Is there a confound problem? Do we have at least two samples per batch? This will return true even if there is evidence the data has been batch-corrected before; we assume the caller wants to redo it based on the raw dataExpressionDataDoubleMatrix
comBat(ExpressionExperiment ee)
Run ComBat using default settings (parametric)ExpressionDataDoubleMatrix
comBat(ExpressionExperiment ee, ExpressionDataDoubleMatrix originalDataMatrix)
Run ComBat with a specific data matrix.ExperimentalFactor
getBatchFactor(ExpressionExperiment ee)
For convenience of some testing classesstatic ExpressionDataDoubleMatrix
removeOutliers(ExpressionDataDoubleMatrix originalDataMatrix, ExpressionExperiment ee)
Remove outlier samples from the data matrix, based on outliers that were flagged in the experiment (not just candidate outliers)
-
-
-
Field Detail
-
COLLECTION_OF_MATERIAL_URI
public static final String COLLECTION_OF_MATERIAL_URI
- See Also:
- Constant Field Values
-
DE_EXCLUDE_URI
public static final String DE_EXCLUDE_URI
- See Also:
- Constant Field Values
-
DE_INCLUDE_URI
public static final String DE_INCLUDE_URI
- See Also:
- Constant Field Values
-
-
Method Detail
-
checkCorrectability
public boolean checkCorrectability(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentBatchCorrectionService
Is there a Batch factor provided? Is there a confound problem? Do we have at least two samples per batch? This will return true even if there is evidence the data has been batch-corrected before; we assume the caller wants to redo it based on the raw data- Specified by:
checkCorrectability
in interfaceExpressionExperimentBatchCorrectionService
- Parameters:
ee
- the experiment- Returns:
- whether it is correctable
-
comBat
public ExpressionDataDoubleMatrix comBat(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentBatchCorrectionService
Run ComBat using default settings (parametric)The matrix is constructed from the experiment's processed vectors.
- Specified by:
comBat
in interfaceExpressionExperimentBatchCorrectionService
-
comBat
public ExpressionDataDoubleMatrix comBat(ExpressionExperiment ee, ExpressionDataDoubleMatrix originalDataMatrix)
Description copied from interface:ExpressionExperimentBatchCorrectionService
Run ComBat with a specific data matrix.- Specified by:
comBat
in interfaceExpressionExperimentBatchCorrectionService
originalDataMatrix
- the matrix- Returns:
- batch corrected matrix, or null if there's no batching factor
-
removeOutliers
public static ExpressionDataDoubleMatrix removeOutliers(ExpressionDataDoubleMatrix originalDataMatrix, ExpressionExperiment ee)
Remove outlier samples from the data matrix, based on outliers that were flagged in the experiment (not just candidate outliers)- Returns:
- the original matrix, or if outliers were present, a new matrix with the outliers removed
-
getBatchFactor
public ExperimentalFactor getBatchFactor(ExpressionExperiment ee)
Description copied from interface:ExpressionExperimentBatchCorrectionService
For convenience of some testing classes- Specified by:
getBatchFactor
in interfaceExpressionExperimentBatchCorrectionService
- Parameters:
ee
- the experiment to get the batch factor for- Returns:
- the batch factor of the experiment, or null, if experiment has no batch factor
-
-