retainClusters: Retain clusters by applying filter

View source: R/local_correlations.R

retainClustersR Documentation

Retain clusters by applying filter

Description

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 ) 

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


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