powered by
This function returns a list with elements useful to check and compare cell clustering.
LouvainDepart( data, pdat = NULL, PCA = TRUE, N = 15, pres = 0.8, tsne = FALSE, umap = FALSE, ... )# S3 method for scppp LouvainDepart( data, pdat = NULL, PCA = TRUE, N = 15, pres = 0.8, tsne = FALSE, umap = FALSE, ... )# S3 method for matrix LouvainDepart( data, pdat = NULL, PCA = TRUE, N = 15, pres = 0.8, tsne = FALSE, umap = FALSE, ... )
# S3 method for scppp LouvainDepart( data, pdat = NULL, PCA = TRUE, N = 15, pres = 0.8, tsne = FALSE, umap = FALSE, ... )
# S3 method for matrix LouvainDepart( data, pdat = NULL, PCA = TRUE, N = 15, pres = 0.8, tsne = FALSE, umap = FALSE, ... )
A list with the following elements:
sdata
A Seurat object
tsne_data
A matrix containing t-SNE dimension reduction results, with cells as rows and first two t-SNE dimensions as columns; NULL if tsne = FALSE
tsne = FALSE
umap_data
A matrix containing UMAP dimension reduction results, with cells as rows and first two UMAP dimensions as columns; NULL if umap = FALSE
umap = FALSE
res_clust
A data frame containing two columns: names (cell names) and clusters (cluster labels)
A UMI count matrix with genes as rows and cells as columns, or an S3 object of class 'scppp'.
A matrix used as input for cell clustering. If not specified, the departure matrix will be calculated within the function.
A logical value specifying whether to apply PCA before Louvain clustering. Default is TRUE.
TRUE
A numeric value specifying the number of principal components included for further clustering (default 15).
A numeric value specifying the resolution parameter in Louvain clustering (default 0.8).
A logical value specifying whether t-SNE dimension reduction should be applied for visualization.
A logical value specifying whether UMAP dimension reduction should be applied for visualization.
Not used.
This is a function used to get cell clustering using Louvain clustering algorithm implemented in the Seurat package.
Seuratscpoisson
set.seed(1234) test_set <- matrix(rpois(500, 2), nrow = 20) rownames(test_set) <- paste0("gene", 1:nrow(test_set)) colnames(test_set) <- paste0("cell", 1:ncol(test_set)) LouvainDepart(test_set)
Run the code above in your browser using DataLab