combineResults: Combine results into a single data.frame

View source: R/combineResults.R

combineResultsR Documentation

Combine results into a single data.frame

Description

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

Usage

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

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 May 23, 2023, 1:29 a.m.