extractCorrelationScores: Extract sample-level correlation scores

View source: R/extractCorrelationScores.R

extractCorrelationScoresR Documentation

Extract sample-level correlation scores

Description

Extract sample-level correlation scores for each cluster

Usage

extractCorrelationScores(
  epiSignal,
  gRanges,
  clustList,
  method = c("deltaSLE", "Delaneau"),
  method.corr = c("pearson", "kendall", "spearman"),
  BPPARAM = SerialParam(),
  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

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