rmRNAseq (version 0.1.0)

my_splineDiffExprs: Differential expression analysis based on natural cubic spline regression models for time-course data

Description

This function is a modified version of splineDiffExprs function that allows data input as log-transformed counts taking into account the voom-weights and 75th quantile as library size. The function compares time dependent behaviour of genes in two different groups. Applying empirical Bayes moderate F-statistic on differences in coefficients of fitted natural cubic spline regression models, differentially expressed in time genes are determined. The function is a wrapper of other R-functions to simplify differential expression analysis of time-course data.

Usage

my_splineDiffExprs(eSetObject, df, cutoff.adj.pVal = 1, reference,
  intercept = TRUE, voom_method = FALSE)

Arguments

eSetObject

ExpressionSet object of class ExpressionSet containing log-ratios or log-values of expression for a series of microarrays

df

number of degrees of freedom

cutoff.adj.pVal

Benjamini-Hochberg adjusted p-value cut-off

reference

character defining which treatment group should be considered as reference

intercept

if TRUE, F-test includes all parameters; if FALSE, F-test includes shape parameters only; default is TRUE

voom_method

logical value TRUE or FALSE. TRUE when using log-transformed counts, voom-weight, and 75th quantile library size

Value

a list of 4 components

fit

output of lmFit function.

pv

a vector of p-values of the test for line effect

qv

a vector of q-values corresponding to the pv above.

diffExprs

A data.frame with rows defining names/IDs of differentially expressed genes

Examples

Run this code
# NOT RUN {
library(rmRNAseq)
data(design)
data(covset)
data("resSymm")
EE <- 40
DE <- 10
n_idx <- sample(nrow(resSymm$ori.res$v), size = EE + DE)
v <- resSymm$ori.res$v[n_idx,]
newlm <- resSymm$ori.res$newlm[n_idx,]
BetaMat <- data.matrix(newlm[grep("fixed.", names(newlm))])
BetaMat[1:EE, 2] <- 0
BetaMat[(EE+1):(EE+DE), 2] <- BetaMat[(EE+1):(EE+DE), 2]*4
Sigma2Vec <- newlm$s2_shrunken
RhoVec <- data.matrix(newlm[grep("rho.", names(newlm))])
WeightMat <- v$weights
lib.size <- v$targets$lib.size
nrep <- 1
Subject <- covset$ear
Time <- covset$time
counts <- rmRNAseq:::sc_Symm(BetaMat, Sigma2Vec, RhoVec, WeightMat,
lib.size, design, Subject, Time,nrep)
inData <- counts
colnames(inData) <- paste(covset$line, Subject, covset$timef,sep="_")
design <- rmRNAseq::design
design1 <- data.frame(row.names=colnames(inData),
"SampleName"=colnames(inData),
"Time"=covset$time,"Treatment"=covset$line)
phenoData <- new("AnnotatedDataFrame",data=design1)
data <- Biobase::ExpressionSet(assayData=as.matrix(inData),phenoData=phenoData)
diffExprs <- rmRNAseq:::my_splineDiffExprs(eSetObject = data, df = 3,cutoff.adj.pVal = 1,
                            reference = "L",intercept = TRUE, voom_method = FALSE)
rmRNAseq:::pauc_out(diffExprs$pv, EE , DE)
diffExprs2 <- rmRNAseq:::my_splineDiffExprs(eSetObject = data, df = 3,cutoff.adj.pVal = 1,
reference = "L",intercept = TRUE, voom_method = TRUE)
rmRNAseq:::pauc_out(diffExprs2$pv, EE , DE)
# }

Run the code above in your browser using DataLab