Learn R Programming

aPEAR (version 1.0.0)

findPathClusters: Find pathway clusters

Description

Calculates the clusters within the enrichment data based on pathway similarity.

Usage

findPathClusters(enrichment, methods = aPEAR.methods, verbose = FALSE, ...)

Value

a list of two objects: sim - pathway similarity matrix; and clusters - pathway clusters

a list of clusters and similarity matrix

Arguments

enrichment

a data.frame containing enrichment results

methods

methods for calculating the pathway clusters within the enrichment result (object of class aPEAR.methods; default: aPEAR.methods)

verbose

enable / disable log messages (default: FALSE)

...

additional parameters (see ?aPEAR.methods)

Examples

Run this code
# \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