variabilityIndex: Variability Index

Description Usage Arguments Details Value Author(s) Examples

View source: R/variabilityIndex.r

Description

Variability Index

Usage

1
variabilityIndex(studies, afunction, B = 10, silence = FALSE)

Arguments

studies

a list of K studies. Each element (kth study) of the list is another list consisting gene expression matrix and and label information.

afunction

A function for DE analysis. Options can be function_limma or function_edgeR. Default option is function_limma. However, use could define their own function. The input of afunction should be list(data, label) which is consistent with one element of the studies list/argument. The return of afunction should be list(pvalue=apvalue, effectSize=aeffectsize)

B

number of permutation should be used. B=1000 is suggested.

silence

If TRUE, will print out the bootstrapping procedure.

Details

Variability Index via boostrap AW weight.

Value

A list consisting of biomarker categrorization result.

varibility

Varibility index for all genes

Author(s)

Zhiguang Huo

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
N0 = 10
G <- 1000
GDEp <- 50
GDEn <- 50
K = 4

studies <- NULL
set.seed(15213)
for(k in 1:K){
    astudy <- matrix(rnorm(N0*2*G),nrow=G,ncol=N0*2)
    ControlLabel <- 1:N0
    caseLabel <- (N0 + 1):(2*N0)

    astudy[1:GDEp,caseLabel] <- astudy[1:GDEp,caseLabel] + 2
    astudy[1:GDEp + GDEn,caseLabel] <- astudy[1:GDEp + GDEn,caseLabel] - 2

    alabel = c(rep(0,length(ControlLabel)),rep(1,length(caseLabel)))

    studies[[k]] <- list(data=astudy, label=alabel)
}


result <- variabilityIndex(studies,function_limma,B=100)
head(result)

Example output

calculating permutated score, b = 1,2,..., B (= 100)  [one "." per sample]:
.................................................. 50 
.................................................. 100 

 calculating variability index 
       [,1]   [,2]   [,3]   [,4]
[1,] 0.0000 0.0000 0.0000 0.0000
[2,] 0.0000 0.2604 0.0000 0.0000
[3,] 0.0396 0.0784 0.0000 0.0000
[4,] 0.0784 0.0000 0.0000 0.0000
[5,] 0.0396 0.0000 0.0000 0.1164
[6,] 0.0000 0.7084 0.0396 0.0000

AWFisher documentation built on Nov. 8, 2020, 5:42 p.m.