TC_CAR1: RNA-seq Analysis for Repeated-measures Data

Description Usage Arguments Value References Examples

View source: R/TC_CAR1.R

Description

This function implements our parametric bootstrap to analyze repeated measures RNA-seq data.

Usage

1
2
TC_CAR1(counts, design, Subject, Time, C.matrix, Nboot = 100,
  ncores = 1, print.progress = FALSE, saveboot = FALSE)

Arguments

counts

a matrix of RNA-seq counts.

design

a design matrix.

Subject

a vector of subjects or experimental units.

Time

a vector of time points.

C.matrix

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

Nboot

number of bootstrap replicates, default is 100.

ncores

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

print.progress

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

saveboot

TRUE or FALSE to save or not save bootstrap output

Value

a list of 3 components

ori.res

a list of 2 components v: voom's output, newlm: output from voomgls_CAR1.

boot.res

a list of Nboot components, each component is the output of voomgls_CAR1 when apply this function to the corresponding bootstrap sample.

pqvalue

a list 2 components: pv: a matrix of p-values of the tests construted in C.matrix qv: matrix of q-values obtaining from using Nettleton 2006 paper approach, using jabes.q function.

References

Yet Nguyen, Dan Nettleton, 2019. rmRNAseq: RNA-seq Analysis for Repeated-measures Data.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# This example shows how to implement the method using LPS RFI data.
data(dat)
data(design)
data(covset)
Subject <- covset$ear
Time <- covset$time
Nboot <- 2  # for real data analysis, use Nboot at least 100
ncores <- 1 # for real data analysis and if the computer allows, increase ncores to save time
print.progress <- FALSE
saveboot <- FALSE
counts <- dat[1:3,]
C.matrix <- list()
# test for Line main effect
C.matrix[[1]] <- limma::makeContrasts(line2, levels = design)
# test for Time main effect
C.matrix[[2]] <- limma::makeContrasts(time2, time6, time24, levels = design)
names(C.matrix) <- c("line2", "time")
TCout <- rmRNAseq:::TC_CAR1(counts, design, Subject, Time, C.matrix,
Nboot, ncores, print.progress, saveboot)
names(TCout)
TCout$pqvalue$pv
TCout$pqvalue$qv

rmRNAseq documentation built on Nov. 8, 2019, 5:06 p.m.