collapseClusters: Collapse clusters based on jaccard index

View source: R/local_correlations.R

collapseClustersR Documentation

Collapse clusters based on jaccard index

Description

Collapse clusters if jaccard index between clusters exceeds a cutoff

Usage

collapseClusters(treeListClusters, featurePositions, jaccardCutoff = 0.9)

Arguments

treeListClusters

from createClusters()

featurePositions

GRanges object storing location of each feature

jaccardCutoff

cutoff value for jaccard index

Value

subset of clusters in treeListClusters that passes cutoff

Examples

library(GenomicRanges)
library(BiocParallel)

# load data
data('decorateData')

# Evaluate hierarchical clustering
# adjacentCount is the number of adjacent peaks considered in correlation
treeList = runOrderedClusteringGenome( simData, simLocation)

# Choose cutoffs and return cluster
treeListClusters = createClusters( treeList, method = "meanClusterSize", meanClusterSize=c( 10, 20, 30, 40, 50) )

# Evaluate strength of correlation for each cluster
clstScore = scoreClusters(treeList, treeListClusters, BPPARAM = SerialParam() )

# Filter to retain only strong clusters
clustInclude = retainClusters( clstScore, "LEF", 0.30 )

# get retained clusters
treeListClusters_filter = filterClusters( treeListClusters, clustInclude)

# collapse similar clusters
treeListClusters_collapse = collapseClusters( treeListClusters_filter, simLocation)


GabrielHoffman/decorate documentation built on May 23, 2023, 1:29 a.m.