collapseClusters: Collapse clusters based on jaccard index

Description Usage Arguments Value Examples

View source: R/local_correlations.R

Description

Collapse clusters if jaccard index between clusters exceeds a cutoff

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
library(GenomicRanges)

# 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 )

# 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 Aug. 8, 2019, 1:48 p.m.