Combine results into a single data.frame for easy post processing
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)
#> Loading required package: ensembldb
#> Loading required package: GenomicFeatures
#> Loading required package: AnnotationDbi
#> Loading required package: AnnotationFilter
#>
#> Attaching package: 'ensembldb'
#> The following object is masked from 'package:stats':
#>
#> filter
# load data
data('decorateData')
# load gene locations
ensdb = EnsDb.Hsapiens.v86
# Evaluate hierarchical clsutering
treeList = runOrderedClusteringGenome( simData, simLocation )
#>
Evaluating:chr20
#>
# Choose cutoffs and return clusters
treeListClusters = createClusters( treeList, method = "meanClusterSize", meanClusterSize=c( 10, 20) )
#> Method:meanClusterSize
# Evaluate strength of correlation for each cluster
clstScore = scoreClusters(treeList, treeListClusters )
#> Evaluating strength of each cluster...
#>
#> Dividing work into 2 chunks...
# 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 )
#> Using cutoffs:
#> Cluster set cutoff
#> 10 0.3
#> 20 0.3
#>
# get retained clusters
treeListClusters_filter = filterClusters( treeListClusters, clustInclude)
# collapse redundant clusters
treeListClusters_collapse = collapseClusters( treeListClusters_filter, simLocation, jaccardCutoff=0.9)
#> Identifying redundant clusters...
# Evaluate Differential Correlation between two subsets of data
sledRes = evalDiffCorr( simData, metadata$Disease, simLocation, treeListClusters_collapse, npermute=c(20, 200, 2000))
#> Note that clusters of 2 or fewer features are omitted from analysis
#>
#> # Clusters:30
#> Initial pass through all clusters...
#> Intensive second pass...
#> Combining results...
#>
# Combine results for each cluster
df_results = combineResults( sledRes, clstScore, treeListClusters, simLocation)
#> Summarizing analysis...
#> Summarizing cluster properties...
#> Collecting cluster locations...
#> Summarizing each cluster...
#> Merging results...