find_clusters.Rd
Performs clustering of SNN graph of genesets.
# S3 method for BOWER find_clusters(bower, resolution = 3, ...) # S3 method for igraph find_clusters(gr, resolution = 3, ...)
bower | BOWER class.. |
---|---|
resolution | value for leiden clustering. |
... | passed to leiden::leiden. |
gr | igraph object. |
Cluster assignment for each geneset.
gmt_file <- system.file("extdata", "h.all.v7.4.symbols.gmt", package = "bowerbird") bwr <- bower(gmt_file) bwr <- snn_graph(bwr) bwr <- find_clusters(bwr) bwr #> BOWER class #> number of genesets: 50 #> genesets kNN Graph: #> IGRAPH 8d29876 UNW- 50 124 -- #> + attr: name (v/c), cluster (v/n), geneset_size (v/n), weight (e/n) #> + edges from 8d29876 (vertex names): #> [1] HALLMARK_TNFA_SIGNALING_VIA_NFKB--HALLMARK_HYPOXIA #> [2] HALLMARK_TNFA_SIGNALING_VIA_NFKB--HALLMARK_TGF_BETA_SIGNALING #> [3] HALLMARK_TNFA_SIGNALING_VIA_NFKB--HALLMARK_IL6_JAK_STAT3_SIGNALING #> [4] HALLMARK_TNFA_SIGNALING_VIA_NFKB--HALLMARK_APOPTOSIS #> [5] HALLMARK_TNFA_SIGNALING_VIA_NFKB--HALLMARK_MYOGENESIS #> [6] HALLMARK_TNFA_SIGNALING_VIA_NFKB--HALLMARK_COMPLEMENT #> [7] HALLMARK_TNFA_SIGNALING_VIA_NFKB--HALLMARK_EPITHELIAL_MESENCHYMAL_TRANSITION #> + ... omitted several edges #> number of geneset clusters: 10