View source: R/randomWalk_sparse.R
randomWalk_sparse | R Documentation |
Calculate the network propagation score using a set of seed cells and cell-to-cell graph.
randomWalk_sparse( intM, queryCells, gamma = 0.05, seedWeight = "NO", stationary_cutoff = 1e-05 )
intM |
a sparse matrix indicating the adjacent matrix (m x m, where m is the cell number) of cell-to-cell network (M-kNN graph). |
queryCells |
a logical vector indicating seed cells (TRUE) and non-seed cells (FALSE) with length of m, where m is the cell number. The length and position are corresponding to intM. |
gamma |
a numeric value indicating the probability of node restart at each step of random walk. |
seedWeight |
a numeric vector indicating the weight assigned to each node. "NO" (by default) means considering weights are equal (no weight). |
stationary_cutoff |
Delta used for determine the stationary state between any two adjacent iterations. |
a numeric vector of network propagation score with length of m, where m is the cell number.
mutualknn30 <- example_results$mutualknn30 seed_idx <- example_results$seed_idx np_score <- randomWalk_sparse(intM = mutualknn30, queryCells = rownames(mutualknn30)[seed_idx])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.