View source: R/process_imputation.R
impute_abundance | R Documentation |
This function offers different methods to impute missing values in data.
impute_abundance(
object,
level = c(NULL, "Kingdom", "Phylum", "Class",
"Order", "Family", "Genus",
"Species", "Strain", "unique"),
group,
ZerosAsNA = FALSE,
RemoveNA = TRUE,
cutoff = 20,
method = c("none", "LOD", "half_min", "median",
"mean", "min", "knn", "rf",
"global_mean", "svd", "QRILC"),
LOD = NULL,
knum = 10)
object |
(Required). a |
level |
(Optional). character. Summarization
level (from |
group |
(Required). character. group for determining missing values. |
ZerosAsNA |
(Optional). logical. zeros in the data are missing values (default: FALSE). |
RemoveNA |
(Optional). logical. those features with more than selected cutoff missing values in each group have to be removed (default: TRUE). |
cutoff |
(Optional). numeric. percentage of missing values allowed in each group. If one of the groups have less missing values than selected cutoff value, these feature will not be removed. |
method |
(Optional). character. Imputation method. Options are:
|
LOD |
(Optional). Numeric. limit of detection (default: NULL). |
knum |
(Optional). Numeric. Number of neighbors to be used in the imputation (default=10). |
A phyloseq::phyloseq
or
SummarizedExperiment::SummarizedExperiment
object with cleaned data.
Created by Pol Castellano-Escuder; Modified by Hua Zou (12/02/2022 Shenzhen China)
Armitage, E. G., Godzien, J., Alonso‐Herranz, V., López‐Gonzálvez, Á., & Barbas, C. (2015). Missing value imputation strategies for metabolomics data. Electrophoresis, 36(24), 3050-3060.
## Not run:
# phyloseq object
data("Zeybel_2022_gut")
impute_abundance(
Zeybel_2022_gut,
level = "Phylum",
group = "LiverFatClass",
ZerosAsNA = TRUE,
RemoveNA = TRUE,
cutoff = 20,
method = "knn")
# SummarizedExperiment object
data("Zeybel_2022_protein")
impute_abundance(
Zeybel_2022_protein,
group = "LiverFatClass",
ZerosAsNA = TRUE,
RemoveNA = TRUE,
cutoff = 20,
method = "knn")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.