imputeIntensity | R Documentation |
Performs a variety of data imputation methods on a matrix-like object or SummarizedExperiment object. The methods include k-Nearest Neighbors (kNN), Random Forest (RF), and many others from the MsCoreUtils::impute_matrix. See the details below.
## S4 method for signature 'ANY'
imputeIntensity(
x,
method = c("knn", "rf", "bpca", "QRILC", "MLE", "MinDet", "MinProb", "min", "zero",
"mixed", "nbavg", "with", "none"),
...
)
## S4 method for signature 'SummarizedExperiment'
imputeIntensity(
x,
method = c("knn", "rf", "bpca", "QRILC", "MLE", "MinDet", "MinProb", "min", "zero",
"mixed", "nbavg", "with", "none"),
i,
name,
...
)
x |
A matrix-like object or SummarizedExperiment object. |
method |
A string specifying which imputation method to use. |
... |
Arguments passed to a specific imputation method. |
i |
A string or integer value specifying which assay values to use
when |
name |
A string specifying the name to be used to store the imputed
intensities in |
The method argument can be one of "knn", "rf", "bpca", "QRILC", "MLE", "MinDet", "MinProb", "min", "zero", "mixed", "nbavg", "with", "none". Please choose one that best describes the nature of missing data. While this function provides several simple imputation methods, they may only work under restrictive assumptions.
"knn" performs kNN imputation based on the Gower distance or Euclidean distance. See imputeKNN for details.
"rf" performs random forest imputation using the missForest::missForest, as described in Stekhoven D. J., & Buehlmann, P. (2012). This method is not sensitive to monotonic transformations of the intensity matrix.
For the other method arguments, please refer to the MsCoreUtils::impute_matrix. Briefly,
"bpca": Bayesian PCA missing value imputation.
"QRILC": Quantile regression approach for the imputation of left-censored missing data.
"MLE": Maximum likelihood-based imputation.
"MinDet": Deterministic minimal value approach for the imputation of left-censored data.
"MinProb": Stochastic minimal value approach for the imputation of left-censored data.
"min": Replace the missing values with the smallest non-missing value in the data.
"zero": Replace the missing values with 0.
"mixed": Mixed imputation applying two methods.
"nbavg": Average neighbour imputation for fractions collected along a fractionation/separation gradient.
"with": Replace the missing values with a user-provided value.
"none": Reserved for the "mixed" method.
A matrix or SummarizedExperiment object of the same
dimension as x
containing the imputed intensities.
Laurent Gatto, Johannes Rainer and Sebastian Gibb (2021). MsCoreUtils: Core Utils for Mass Spectrometry Data. R package version 1.4.0. https://github.com/RforMassSpectrometry/MsCoreUtils
Stekhoven D. J., & Buehlmann, P. (2012). MissForest - non-parametric missing value imputation for mixed-type data. Bioinformatics, 28(1), 112-118.
See imputeKNN, missForest::missForest, and MsCoreUtils::impute_matrix for the underlying functions that do work.
data(faahko_se)
## SummarizedExperiment object
se <- imputeIntensity(faahko_se, i = "raw", name = "imp1", method = "knn")
assayNames(se)
## Matrix
m <- assay(faahko_se, i = "raw")
imputeIntensity(m, method = "min")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.