recommend_k | R Documentation |
recommand optimized K value for KNN
recommend_k( spRNA, scRNA, dims = 1:30, k.neighbor = c(5, seq(10, 80, by = 10)), infered.assay = "enhanced", n.core = 8, correct.spRNA = FALSE, correct.scRNA = FALSE, correct.weight.NN = 0.2, correct.neighbor = 5 )
spRNA |
seurat object of spatial transcriptome data |
scRNA |
seurat object of single cell RNA-seq data |
dims |
which dimensions to use when find the nearest neighbors |
k.neighbor |
a list of K to test |
infered.assay |
names of output assay in seurat object |
n.core |
number of CPU cores used to parallel. |
correct.spRNA |
Whether to stabilize expression in spRNA. |
correct.scRNA |
Whether to stabilize expression in scRNA. |
correct.neighbor |
number of nearest neighbors used to correct expr. |
weighted.KNN |
we use a dynamics weight to assign scRNA values to spRNA. The dynamics weight based on the correlation between scRNA cell and spRNA cell. |
RNA.weight |
the weight of scRNA-seq expression when genes detected both in spRNA and scRNA. RNA.weight should be 0 to 1. The inferred expression = (1 - RNA.weight) * spRNA + RNA.weight * scRNA. |
returns a ggplot2 object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.