retainClusters: Retain clusters by applying filter

Description Usage Arguments Value Examples

View source: R/local_correlations.R

Description

Retain clusters by applying filter

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 July 26, 2021, 12:18 a.m.