getmutualknn | R Documentation |
Get a mutual kNN graph (M-kNN) from the latent space (LSI) of single cell profiles
getmutualknn(lsimat, num_k = 30)
lsimat |
A dense or sparse matrix of cell (rows) x LSI (cols) |
num_k |
A numeric input (30 by default) for k used for graph construction |
A sparse matrix indicating adjacent matrix from single cells used for graph construction
SE_pbmc5k <- example_data(name="pbmc5k_SE.rda") peak_by_cell_mat <- SummarizedExperiment::assay(SE_pbmc5k) #### Downsample to speed up example #### peak_by_cell_mat <- peak_by_cell_mat[seq_len(500), seq_len(100)] tfidf_mat <- tfidf(bmat=peak_by_cell_mat) lsi_mat <- do_lsi(mat=tfidf_mat, dims=30) mknn_graph <- getmutualknn(lsimat=lsi_mat, num_k=30)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.