Skip to contents

Retain clusters by applying filter

Usage

retainClusters(clstScore, metric = "LEF", cutoff = 0.4)

Arguments

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

Value

data.frame of chrom, clutser, id (the clustering parameter value), and the specified metric

Examples

library(GenomicRanges)
library(BiocParallel)

data('decorateData')

# Evaluate hierarchical clustering
treeList = runOrderedClusteringGenome( simData, simLocation ) 
#> 
Evaluating:chr20          
#> 

# Choose cutoffs and return clusters
treeListClusters = createClusters( treeList )
#> Method:capushe

# Evaluate score for each cluster
clstScore = scoreClusters(treeList, treeListClusters, BPPARAM = SerialParam() )
#> Evaluating strength of each cluster...
#> 
#> Dividing work into 1 chunks...

# Retain clusters that pass this criteria
clustInclude = retainClusters( clstScore, "LEF", 0.30 )
#> Using cutoffs:
#> Cluster set	cutoff
#>  0.15		0.3
#> 

# Or filter by mean absolute correlation
# clustInclude = retainClusters( clstScore, "mean_abs_corr", 0.1 )

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