stats: Wrapper function for RNA-Seq differential expression analysis

stats_edgeRR Documentation

Wrapper function for RNA-Seq differential expression analysis

Description

Call different methods with normalisation methods

Usage

stats_edgeR(data, cls, com, norm.method = "TMM", ...)

stats_DESeq2(data, cls, com, norm.method = "TMM", ...)

stats_NOISeq(data, cls, com, norm.method = "TMM", ...)

stats_NBPSeq(data, cls, com, norm.method = "TMM", ...)

stats_EBSeq(data, cls, com, norm.method = "TMM", ...)

stats_SAMseq(data, cls, com, norm.method = "TMM", ...)

stats_voom(data, cls, com, norm.method = "TMM", ...)

stats_TSPM(data, cls, com, norm.method = "TMM", ...)

stats_test(
  data,
  cls,
  com,
  norm.method = "TMM",
  test.method = "oneway.test",
  ...
)

Arguments

data

a data frame with gene x replicate format

cls

a vector for class/group information

com

a character string for comparison

norm.method

normalisation method

...

further parameters to be passed into modelling

test.method

hypothesis testing method for stats_test, e.g. oneway.test(), kruskal.test(), wilcox.test(), t.test().

Details

stats_edgeR uses only edgeR::exactTest() for modelling.

stats_DESeq2 uses DESeq2::nbinomWaldTest() only.

Value

a list with contents:

  • stats statistical summary

  • rej.num p-value rejection

  • data transposed and normalised data set

  • cls factor for class information

  • padjf p-values, adjusted p-values and adjusted p-values with filtering

References

Paul L. Auer and Rebecca W Doerge, A Two-Stage Poisson Model for Testing RNA-Seq Data, Statistical Applications in Genetics and Molecular Biology, 2011 (TSPM R codes: https://www.stat.purdue.edu/~doerge/software/TSPM.R)

Examples

## data set from R package 'pasilla' 
dn <- system.file("extdata/pasilla_gene_counts.tsv", package = "rnaseqdea")
data <- read.table(dn, header = TRUE, row.names = 1, quote = "", comment.char = "")
keep <- rowSums(data) > 6000
data <- data[keep, ]
cls <- c("untreated", "untreated", "untreated", "untreated", 
         "treated", "treated", "treated")
cls <- as.factor(cls)

## use edgeR
res <- stats_edgeR(data, cls, com = levels(cls), norm.method = "TMM")
names(res)     # "stats", "rej.num", "data", "cls", "padjf"
res$rej.num 
head(res$stats)

## Not run:  
## use DESeq2
res <- stats_DESeq2(data, cls, com = levels(cls), norm.method = "DESeq")

## use SAMseq
set.seed(100) 
res <- stats_test(data, cls, com = levels(cls), norm.method = "RLE") 

## use hypothesis test
res <- stats_test(data, cls, com = levels(cls), norm.method = "UQ") 

## change test method
res <- stats_test(data, cls, com = levels(cls), norm.method = "UQ", 
                  test.method = wilcox.test)

## End(Not run) 


wanchanglin/rnaseqdea documentation built on June 2, 2025, 1:05 a.m.