rmRNAseq (version 0.1.0)

voomgls_CAR1: General Linear Model Using Voom Output

Description

This function run general linear model with corCAR1 correlation structure in function gls for all genes where the input data come from the output of voom.

Usage

voomgls_CAR1(v, Subject, Time, ncores = 1, C.matrix, beta0 = NULL,
  print.progress = FALSE)

Arguments

v

output of voom function.

Subject

a vector of subjects or experimental units.

Time

a vector of time points.

ncores

number of cores for embarrassingly parallel procedure. Default value of ncores is 1.

C.matrix

is a list of matrix Ci in testing H0: Ci*beta = 0.

beta0

vector of the hypothesized value of beta, usually, beta0 is a 0 vector. The default option beta0 = NULL means that beta0 is a vector of 0.

print.progress

logical indicator, TRUE or FALSE, to print the progress.

Value

a data frame has G rows (= number of genes) containing all outputs from glsCAR1 function, shrinkage estimates of error variances, and F-type test statistics calculated by teststat function.

Examples

Run this code
# NOT RUN {
data(res)
data(covset)
v <- res$ori.res$v
v$E <- v$E[1:50,]
v$weights <- v$weights[1:50,]
Subject <- covset$ear
Time <- covset$time
ncores <- 1
C.matrix <- list()
C.matrix[[1]] <- limma::makeContrasts(line2, levels = design)
C.matrix[[2]] <- limma::makeContrasts(time2, levels = design)
C.matrix[[3]] <- limma::makeContrasts(time6, levels = design)
C.matrix[[4]] <- limma::makeContrasts(time24, levels = design)
C.matrix[[5]] <- limma::makeContrasts(linetime2, levels = design)
C.matrix[[6]] <- limma::makeContrasts(linetime6, levels = design)
C.matrix[[7]] <- limma::makeContrasts(linetime24, levels = design)
C.matrix[[8]] <- limma::makeContrasts(time2, time6, time24, levels = design)
C.matrix[[9]] <- limma::makeContrasts(linetime2,linetime6, linetime24, levels = design)
names(C.matrix) <- c("line2", "time2", "time6", "time24",
                    "linetime2", "linetime6", "linetime24",
                    "time", "int")
beta0 <- NULL
print.progress <- FALSE
voomglsout <- rmRNAseq:::voomgls_CAR1(v, Subject, Time, ncores,
C.matrix, beta0, print.progress)
# }

Run the code above in your browser using DataLab