perform.graph.cluster: Performs graph-based clustering

Description Usage Arguments Value Examples

View source: R/perform.seurat.cluster.R

Description

Performs graph-based clustering on previously generated neighbouhood graphs.

Usage

1
2
3
4
5
6
7
8
9
perform.graph.cluster(
  object,
  assay,
  neighbours,
  algorithm = 1,
  cluster.df.name.suffix = "",
  res = c(0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1, 1.1, 1.2, 1.3, 1.4, 1.5),
  ...
)

Arguments

object

IBRAP S4 class object

assay

Character. String containing indicating which assay to use

neighbours

Character. String indicating which neighbourhood graphs should be used.

algorithm

Numerical. Algorithm for modularity optimization (1 = original Louvain algorithm; 2 = Louvain algorithm with multilevel refinement; 3 = SLM algorithm; 4 = Leiden algorithm). Leiden requires the leidenalg python. Default = 1 Default = NULL

res

Numerical vector. Which resolution to run the clusterign algorithm at, a smaller and larger value identified less and more clusters, respectively. Default = c(0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1,1.1,1.2,1.3,1.4,1.5)

...

arguments to be passed to Seurat::FindClusters

cluster.df.name

Character. What to call the df contained in clusters. Default = 'seurat

Value

Cluster assignments using the list of resolutions provided contained within cluster_assignments under cluster.df.name

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
object <- perform.nn.v1(object = object, assay = c('SCT', 'SCRAN', 'SCANPY'), 
                        reduction = c('pca_harmony','scanorama'), 
                        dims = list(0,0), generate.diffmap = T)

object <- perform.nn.v1(object = object, assay = c('SCT', 'SCRAN', 'SCANPY'), 
                        reduction = c('pca_bbknn_bbknn:diffmap','pca_harmony_nn.v1:diffmap', 'scanorama_nn.v1:diffmap'), 
                        dims = list(0,0,0))

object <- perform.nn.v2(object = object, assay = c('SCT', 'SCRAN', 'SCANPY'), 
                       reduction = c('pca_harmony','scanorama','pca_bbknn_bbknn:diffmap',
                                     'pca_harmony_nn.v1:diffmap', 'scanorama_nn.v1:diffmap'), 
                       dims = list(0,0,0,0,0))
                       
object <- perform.graph.cluster(object = object, assay = c('SCT', 'SCRAN', 'SCANPY'), 
                                neighbours = c("pca_bbknn_bbknn",
                                               "pca_harmony_nn.v1",
                                               "scanorama_nn.v1",
                                               "pca_bbknn_bbknn:diffmap_nn.v1",
                                               "pca_harmony_nn.v1:diffmap_nn.v1",
                                               "scanorama_nn.v1:diffmap_nn.v1",
                                               "pca_harmony_nn.v2",
                                               "scanorama_nn.v2",
                                               "pca_bbknn_bbknn:diffmap_nn.v2",
                                               "pca_harmony_nn.v1:diffmap_nn.v2",
                                               "scanorama_nn.v1:diffmap_nn.v2" ), 
                                algorithm = 1)

connorhknight/IBRAP_no_decontX documentation built on Feb. 13, 2022, 2:32 p.m.