evalDiffCorr-methods: Evaluate Differential Correlation

Description Usage Arguments Details Value Examples

Description

Evaluate Differential Correlation between two subsets of data

Usage

 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
evalDiffCorr(
  epiSignal,
  testVariable,
  gRanges,
  clustList,
  npermute = c(100, 10000, 1e+05),
  adj.beta = 0,
  rho = 0,
  sumabs.seq = 1,
  BPPARAM = bpparam(),
  method = c("sLED", "Box", "Box.permute", "Steiger.fisher", "Steiger", "Jennrich",
    "Factor", "Mann.Whitney", "Kruskal.Wallis", "Cai.max", "Chang.maxBoot", "LC.U",
    "WL.randProj", "Schott.Frob", "Delaneau", "deltaSLE"),
  method.corr = c("pearson", "kendall", "spearman")
)

## S4 method for signature 'EList,ANY,GRanges,list'
evalDiffCorr(
  epiSignal,
  testVariable,
  gRanges,
  clustList,
  npermute = c(100, 10000, 1e+05),
  adj.beta = 0,
  rho = 0,
  sumabs.seq = 1,
  BPPARAM = bpparam(),
  method = c("sLED", "Box", "Box.permute", "Steiger.fisher", "Steiger", "Jennrich",
    "Factor", "Mann.Whitney", "Kruskal.Wallis", "Cai.max", "Chang.maxBoot", "LC.U",
    "WL.randProj", "Schott.Frob", "Delaneau", "deltaSLE"),
  method.corr = c("pearson", "kendall", "spearman")
)

## S4 method for signature 'matrix,ANY,GRanges,list'
evalDiffCorr(
  epiSignal,
  testVariable,
  gRanges,
  clustList,
  npermute = c(100, 10000, 1e+05),
  adj.beta = 0,
  rho = 0,
  sumabs.seq = 1,
  BPPARAM = bpparam(),
  method = c("sLED", "Box", "Box.permute", "Steiger.fisher", "Steiger", "Jennrich",
    "Factor", "Mann.Whitney", "Kruskal.Wallis", "Cai.max", "Chang.maxBoot", "LC.U",
    "WL.randProj", "Schott.Frob", "Delaneau", "deltaSLE"),
  method.corr = c("pearson", "kendall", "spearman")
)

## S4 method for signature 'data.frame,ANY,GRanges,list'
evalDiffCorr(
  epiSignal,
  testVariable,
  gRanges,
  clustList,
  npermute = c(100, 10000, 1e+05),
  adj.beta = 0,
  rho = 0,
  sumabs.seq = 1,
  BPPARAM = bpparam(),
  method = c("sLED", "Box", "Box.permute", "Steiger.fisher", "Steiger", "Jennrich",
    "Factor", "Mann.Whitney", "Kruskal.Wallis", "Cai.max", "Chang.maxBoot", "LC.U",
    "WL.randProj", "Schott.Frob", "Delaneau", "deltaSLE"),
  method.corr = c("pearson", "kendall", "spearman")
)

Arguments

epiSignal

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

testVariable

factor indicating two subsets of the samples to compare

gRanges

GenomciRanges corresponding to the rows of epiSignal

clustList

list of cluster assignments

npermute

array of two entries with min and max number of permutations

adj.beta

parameter for sLED

rho

a large positive constant such that A(X)-A(Y)+diag(rep(rho,p)) is positive definite. Where p is the number of features

sumabs.seq

sparsity parameter

BPPARAM

parameters for parallel evaluation

method

"sLED", "Box", "Box.permute", "Steiger.fisher", "Steiger", "Jennrich", "Factor", "Mann.Whitney", "Kruskal.Wallis", "Cai.max", "Chang.maxBoot", "LC.U", "WL.randProj", "Schott.Frob", "Delaneau", "deltaSLE"

method.corr

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

Details

Correlation sturucture between two subsets of the data is evaluated with sparse-Leading-Eigenvalue-Driven (sLED) test:

Zhu, Lingxue, Jing Lei, Bernie Devlin, and Kathryn Roeder. 2017. Testing high-dimensional covariance matrices, with application to detecting schizophrenia risk genes. Annals of Applied Statistics. 11:3 1810-1831. doi:10.1214/17-AOAS1062

Value

list of result by chromosome and clustList

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
35
36
37
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) )

# Plot correlations and clusters in region defined by query
query = range(simLocation)

# Plot clusters
plotDecorate( ensdb, treeList, treeListClusters, simLocation, query)

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

# get summary of results
df = summary( sledRes )

# print results
head(df)

# extract peak ID's from most significant cluster
peakIDs = getFeaturesInCluster( treeListClusters, df$chrom[1], df$cluster[1], "20")

# plot comparison of correlation matrices for peaks in peakIDs
#  where data is subset by metadata$Disease
main = paste0(df$chrom[1], ': cluster ', df$cluster[1])
plotCompareCorr( simData, peakIDs, metadata$Disease) + ggtitle(main)

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