PredictAssay | R Documentation |
This function will predict expression or cell embeddings from its k nearest neighbors index. For each cell, it will average its k neighbors value to get its new imputed value. It can average expression value in assays and cell embeddings from dimensional reductions.
PredictAssay(
object,
nn.idx,
assay,
reduction = NULL,
dims = NULL,
return.assay = TRUE,
slot = "scale.data",
features = NULL,
mean.function = rowMeans,
seed = 4273,
verbose = TRUE
)
object |
The object used to calculate knn |
nn.idx |
k near neighbour indices. A cells x k matrix. |
assay |
Assay used for prediction |
reduction |
Cell embedding of the reduction used for prediction |
dims |
Number of dimensions of cell embedding |
return.assay |
Return an assay or a predicted matrix |
slot |
slot used for prediction |
features |
features used for prediction |
mean.function |
the function used to calculate row mean |
seed |
Sets the random seed to check if the nearest neighbor is query cell |
verbose |
Print progress |
return an assay containing predicted expression value in the data slot
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.