gwc: GWC Score

Description Usage Arguments Value Examples

View source: R/gwc.R

Description

Calculate the gwc score between two vectors, using either a weighted spearman or pearson correlation

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
gwc(
  x1,
  p1,
  x2,
  p2,
  method.cor = c("pearson", "spearman"),
  nperm = 10000,
  truncate.p = 1e-16,
  ...
)

Arguments

x1

numeric vector of effect sizes (e.g., fold change or t statitsics) for the first experiment

p1

numeric vector of p-values for each corresponding effect size for the first experiment

x2

numeric effect size (e.g., fold change or t statitsics) for the second experiment

p2

numeric vector of p-values for each corresponding effect size for the second experiment

method.cor

character string identifying if a pearson or spearman correlation should be used

nperm

numeric how many permutations should be done to determine

truncate.p

numeric Truncation value for extremely low p-values

...

Other passed down to internal functions

Value

numeric a vector of two values, the correlation and associated p-value.

Examples

1
2
3
4
5
6
7
8
data(clevelandSmall_cSet)
x <- molecularProfiles(clevelandSmall_cSet,'rna')[,1]
y <- molecularProfiles(clevelandSmall_cSet,'rna')[,2]
x_p <- rep(0.05, times=length(x))
y_p <- rep(0.05, times=length(y))
names(x_p) <- names(x)
names(y_p) <- names(y)
gwc(x,x_p,y,y_p, nperm=100)

CoreGx documentation built on Nov. 8, 2020, 4:50 p.m.