svplsTest: svplsTest

Description Usage Arguments Value Examples

Description

This function incorporates the significant surrogate variables returned by the function svplsSurr in a linear model along with the group variable in order to estimate the group effect more accurately. The reestimated primary signal (group) effects are then used to test the genes for differential expression. The resulting pvalues are further corrected for multiple hypothesis testing at a prespecified FDR level. The significantly differentially expressed genes are finally returned along with their uncorrected and corrected pvalues.

Usage

1
2
3
svplsTest(dat, phi = function(x) log(x + const), const = 1, group, surr,
  test = c("Wald", "LRT"), mht.method = "BH", fdr.level = 0.05,
  parallel = FALSE, num.cores = NULL)

Arguments

dat

A gene expression count matrix or a 'SummarizedExperiment' object or a 'DGEList' object.

phi

The transforming function to be applied on the original gene expression count data (set to be log function with an offset const).

const

The offset parameter for the transforming function phi (set to 1 by default).

group

a factor representing the sample indices belonging to the two different groups.

surr

A data.frame of the significant surrogate variables.

test

The test to be used for detecting the differentially expressed genes. Options are "Wald" (Wald test with the gene-specific estimated group effects after asjusting for the surrogate variables) and "LRT" (Likelihood Ratio Test).

mht.method

The method to be used for the multiple hypothesis correction (set to the Benjamini-Hochberg procedure ("BH") by default).

fdr.level

The specified level of the False Discovery Rate (FDR) for the multiple hypothesis testing (set to 0.05 by default).

parallel

Logical, indicating if the computations should be parallelized or not (set to FALSE by default).

num.cores

The requested number of cores to be used in the parallel computations inside the function (used only when parallel is TRUE, NULL by default).

Value

An svplsTest object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
##Loading the simulated dataset
data(sim.dat)

##Fitting a linear model with the surrogate variables and detecting the 
##differentially expressed genes
group = as.factor(c(rep(1, 10), rep(-1, 10)))
sv <- svplsSurr(dat = sim.dat, group = group)
surr = surr(sv)
fit = svplsTest(dat = sim.dat, group = group, surr = surr, test = "Wald")

##The detected genes, hidden effect adjusted pvalues, FDR-corrected pvalues and the positive genes detected from the fitted model are given by:
sig.genes(fit)

pvs.unadj(fit)

pvs.adj(fit)

sutigit21/SVAPLSseq documentation built on May 30, 2019, 8:43 p.m.