View source: R/local_correlations.R
collapseClusters | R Documentation |
Collapse clusters if jaccard index between clusters exceeds a cutoff
collapseClusters(treeListClusters, featurePositions, jaccardCutoff = 0.9)
treeListClusters |
from createClusters() |
featurePositions |
GRanges object storing location of each feature |
jaccardCutoff |
cutoff value for jaccard index |
subset of clusters in treeListClusters that passes cutoff
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.