imputeKNN | R Documentation |
Impute query features from a reference dataset using KNN.
imputeKNN(
object,
reference,
queries,
knn_k = 20,
weight = TRUE,
norm = TRUE,
scale = FALSE,
verbose = TRUE
)
object |
|
reference |
Dataset containing values to impute into query dataset(s). |
queries |
Dataset to be augmented by imputation. If not specified, will pass in all datasets. |
knn_k |
The maximum number of nearest neighbors to search. (default 20) |
weight |
Whether to use KNN distances as weight matrix (default FALSE). |
norm |
Whether normalize the imputed data with default parameters (default TRUE). |
scale |
Whether scale but not center the imputed data with default parameters (default TRUE). |
verbose |
Print progress bar/messages (TRUE by default) |
liger
object with raw data in raw.data slot replaced by imputed data (genes by cells)
## Not run:
# Only runable for ATAC dataset. See tutorial on GitHub.
# ligerex (liger object), factorization complete
# impute every dataset other than the reference dataset
ligerex <- imputeKNN(ligerex, reference = "y_set", weight = FALSE)
# impute only z_set dataset
ligerex <- imputeKNN(ligerex, reference = "y_set", queries = list("z_set"), knn_k = 50)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.