Indi.DE.Analysis: Main Function for Individual Study DE: microarray & RNAseq.

Description Usage Arguments Value Examples

Description

Main Function for Individual Study DE: microarray & RNAseq The Indi.DE.Analysis is a function to perform individual association analysis between gene expression and the response/phenoype of interest (can be either group, continuous or survival).

Usage

1
2
3
4
Indi.DE.Analysis(data, clin.data, data.type, resp.type, response,
  covariate = NULL, ind.method, select.group = NULL, ref.level = NULL,
  paired = NULL, asymptotic = NULL, nperm = NULL, tail = "abs",
  seed = 12345, ...)

Arguments

data

is a list of K elements, where K is the number of studies, each element is a microarray or RNAseq expression matrix with G rows and N columns, where G is number of matched genes and N is the sample size.

clin.data

is a list of K elements, each element includes is a clinical data frame with N rows and p columns, where N is the sample size and p is the number of clinical variables (main response included).

data.type

is a character indicating the data type of the elements in data, must be "continuous" or "discrete".

resp.type

is a character indicating the response type of the response variable selected, must be one of "twoclass", "multiclass", "continuous" and "survival".

response

is one column name of clin.data, indicating the phenotype of interest. For survival, two column names have to be specified, the first is the survival time and the second is the censoring status.

covariate

are the clinical covariates you wish to adjust for in the DE analysis, can be a vector of column names or NULL.

ind.method

is a character vector to specify the method used to test if there is association between the gene expression and outcome variable. must be one of "limma", "sam" for "continuous" data type and "edgeR", "DESeq2" or "limmaVoom" for "discrete" data type.

select.group:

for two-class comparison only, specify the two groups for comparison when the group factor has more than two levels.

ref.level:

for two-class/multi-class comparison only, specify the reference level of the group factor.

paired:

logical value indicating whether paired design;

asymptotic:

a logical value indicating whether asymptotic distribution should be used. If FALSE, permutation will be performed.

nperm:

the number of permutations. Applicable when asymptotic is FALSE.

tail:

a character string specifying the alternative hypothesis, must be one of "abs" (default), "low" or "high". For resp.type = "continuous", "survival" only.

seed:

Optional initial seed for random number generator.

Value

a list with components:

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
data('Leukemia')
data('LeukemiaLabel')
data <- Leukemia
K <- length(data)
clin.data <- lapply(label, function(x) {data.frame(x)} )
for (k in 1:length(clin.data)){
 colnames(clin.data[[k]]) <- "label"
}
select.group <- c('inv(16)','t(15;17)')
ref.level <- "inv(16)"
data.type <- "continuous"
ind.method <- c('limma','limma','limma')
resp.type <- "twoclass"
paired <- rep(FALSE,length(data))
ind.res <- Indi.DE.Analysis(data=data,clin.data= clin.data, 
                        data.type=data.type,resp.type = resp.type,
                        response='label',
                        ind.method=ind.method,select.group = select.group,
                        ref.level=ref.level,paired=paired)
N <- sapply(data, FUN=function(x) ncol(x))
survival.time <- lapply(N,FUN = function(x) round(runif(x,10,2000)))
censor.status <- lapply(N,FUN = function(x) sample(c(0,1),x,replace=TRUE) )
for (k in 1:length(clin.data)){
  clin.data[[k]] <- cbind(clin.data[[k]],survival.time[[k]],censor.status[[k]])
  colnames(clin.data[[k]])[2:3] <- c("survival","censor")
}
ind.method <- c('logrank','logrank','logrank')
resp.type <- "survival"
ind.res <- Indi.DE.Analysis(data=data,clin.data= clin.data, 
                         data.type=data.type,resp.type = resp.type,
                         response=c("survival","censor"),
                         ind.method=ind.method,asymptotic=TRUE)

metaOmic/MetaDE documentation built on May 22, 2019, 6:54 p.m.