View source: R/local_correlations.R
retainClusters | R Documentation |
Retain clusters by applying filter
retainClusters(clstScore, metric = "LEF", cutoff = 0.4)
clstScore |
score each cluster using scoreClusters() |
metric |
column of clstScore to use in filtering |
cutoff |
retain cluster than exceed the cutoff for metric. Can be array with one entry per entry in clstScore |
data.frame of chrom, clutser, id (the clustering parameter value), and the specified metric
library(GenomicRanges)
library(BiocParallel)
data('decorateData')
# Evaluate hierarchical clustering
treeList = runOrderedClusteringGenome( simData, simLocation )
# Choose cutoffs and return clusters
treeListClusters = createClusters( treeList )
# Evaluate score for each cluster
clstScore = scoreClusters(treeList, treeListClusters, BPPARAM = SerialParam() )
# Retain clusters that pass this criteria
clustInclude = retainClusters( clstScore, "LEF", 0.30 )
# Or filter by mean absolute correlation
# clustInclude = retainClusters( clstScore, "mean_abs_corr", 0.1 )
# get retained clusters
treeListClusters_filter = filterClusters( treeListClusters, clustInclude )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.