extractCorrelationScores: Extract sample-level correlation scores

Description Usage Arguments Value See Also Examples

View source: R/extractCorrelationScores.R

Description

Extract sample-level correlation scores for each cluster

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
extractCorrelationScores(
  epiSignal,
  gRanges,
  clustList,
  method = c("deltaSLE", "Delaneau"),
  method.corr = c("pearson", "kendall", "spearman"),
  BPPARAM = bpparam(),
  rho = 0.1,
  sumabs = 1
)

Arguments

epiSignal

matrix or EList of epigentic signal. Rows are features and columns are samples

gRanges

GenomciRanges corresponding to the rows of epiSignal

clustList

list of cluster assignments

method

"deltaSLE", "Delaneau"

method.corr

Specify type of correlation: "pearson", "kendall", "spearman"

BPPARAM

parameters for parallel evaluation

rho

used only for sle.score(). A positive constant such that cor(Y) + diag(rep(rho,p)) is positive definite. See sLED::sLED()

sumabs

used only for sle.score(). regularization paramter. Value of 1 gives no regularization, sumabs*sqrt(p) is the upperbound of the L_1 norm of v, controlling the sparsity of solution. Must be between 1/sqrt(p) and 1. See sLED::sLED()

Value

matrix of scores of each sample for each cluster

See Also

sle.score delaneau.score

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
library(GenomicRanges)

# load data
data('decorateData')

# Evaluate hierarchical clustering
# adjacentCount is the number of adjacent peaks considered in correlation
treeList = runOrderedClusteringGenome( simData, simLocation)

# Choose cutoffs and return cluster
treeListClusters = createClusters( treeList, method = "meanClusterSize", meanClusterSize=c( 10, 20, 30, 40, 50) )

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

# Filter to retain only strong clusters
clustInclude = retainClusters( clstScore, "LEF", 0.30 )

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

# collapse similar clusters
treeListClusters_collapse = collapseClusters( treeListClusters_filter, simLocation)

# get correlation scores for each sample for each cluster
corScores = extractCorrelationScores( simData, simLocation, treeListClusters_collapse )

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