combineResults: Combine results into a single data.frame

Description Usage Arguments Examples

View source: R/combineResults.R

Description

Combine results into a single data.frame for easy post processing

Usage

1
2
3
4
5
6
7
combineResults(
  sledRes,
  clstScore,
  treeListClusters,
  peakLocations,
  verbose = TRUE
)

Arguments

sledRes

sLEDresults from evalDiffCorr()

clstScore

cluster summary statistics from from scoreClusters()

treeListClusters

epiclustDiscreteListContain from createClusters()

peakLocations

GenomeRanges object

verbose

show messages

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
library(GenomicRanges)
library(EnsDb.Hsapiens.v86)

# load data
data('decorateData')

# load gene locations
ensdb = EnsDb.Hsapiens.v86

# Evaluate hierarchical clsutering
treeList = runOrderedClusteringGenome( simData, simLocation ) 

# Choose cutoffs and return clusters
treeListClusters = createClusters( treeList, method = "meanClusterSize", meanClusterSize=c( 10, 20) )

# Evaluate strength of correlation for each cluster
clstScore = scoreClusters(treeList, treeListClusters )

# Filter to retain only strong clusters
# If lead eigen value fraction (LEF) > 30% then keep clusters
# LEF is the fraction of variance explained by the first eigen-value
clustInclude = retainClusters( clstScore, "LEF", 0.30 )

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

# collapse redundant clusters
treeListClusters_collapse = collapseClusters( treeListClusters_filter, simLocation, jaccardCutoff=0.9)

# Evaluate Differential Correlation between two subsets of data
sledRes = evalDiffCorr( simData, metadata$Disease, simLocation, treeListClusters_collapse, npermute=c(20, 200, 2000))

# Combine results for each cluster
df_results = combineResults( sledRes, clstScore, treeListClusters, simLocation)

GabrielHoffman/decorate documentation built on July 26, 2021, 12:18 a.m.