svplsTest: svplsTest

Description Usage Arguments Value Examples

View source: R/svplsTest.R

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 effects more accurately. The reestimated primary signals (group effects) are then used to test the features for differential expression. The resulting pvalues are further corrected for multiple hypothesis testing at a prespecified FDR level. The significantly differentially expressed features are finally returned along with their uncorrected and corrected pvalues.

Usage

1
2
3
4
svplsTest(dat, phi = function(x) log(x + const), const = 1,
  normalization = c("TMM", "RLE", "upperquartile", "none"), group, surr,
  test = c("t-test", "LRT"), mht.method = "BH", fdr.level = 0.05,
  parallel = FALSE, num.cores = NULL)

Arguments

dat

The original feature expression count matrix.

phi

The transforming function to be applied on the original feature 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).

normalization

The method to use for normalizing the RNAseq feature expression count data (options are "TMM", "RLE", "upperquartile" or "none").

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 features. Options are "t-test" and "Likelihood Ratio Test (LRT)".

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

pvs.unadj The uncorrected pvalues corresponding to the genes after adjusting for the signatures of hidden variability.

pvs.adj The multiple hypothesis corrected pvalues after adjusting for the signatures of hidden variability.

sig.features The features detected to be significantly differentially expressed between the two groups.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
##Loading a simulated RNAseq gene expression count 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.select = "automatic")
surr = surr(sv)
fit = svplsTest(dat = sim.dat, group = group, surr = surr, normalization = "TMM", test = "t-test")

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

head(pvs.unadj(fit))

head(pvs.adj(fit))

SVAPLSseq documentation built on April 28, 2020, 6:30 p.m.