# \donttest{
# Load libraries
library(clusterProfiler)
library(DOSE)
library(org.Hs.eg.db)
data(geneList)
# Perform enrichment using clusterProfiler
enrich <- gseGO(geneList, OrgDb = org.Hs.eg.db, ont = 'CC')
# Obtain clusters within the enriched pathways using default parameters
data <- findPathClusters(enrich@result)
data$clusters
# Obtain clusters within the enriched pathways using hierarchical clustering
# and minClusterSize = 1
data <- findPathClusters(enrich@result, cluster = 'hier', minClusterSize = 1)
data$clusters
# }
Run the code above in your browser using DataLab