statBayseq: Statistical testing with baySeq

Description Usage Arguments Details Value Author(s) Examples

View source: R/stat.R

Description

This function is a wrapper over baySeq statistical testing. It accepts a matrix of normalized gene counts or an S4 object specific to each normalization algorithm supported by metaseqR2.

Usage

1
2
    statBayseq(object, sampleList, contrastList = NULL,
        statArgs = NULL, libsizeList = NULL)

Arguments

object

a matrix or an object specific to each normalization algorithm supported by metaseqR2, containing normalized counts. See also Details.

sampleList

the list containing condition names and the samples under each condition.

contrastList

vector of contrasts as defined in the main help page of metaseqr2. See also Details.

statArgs

a list of bayseq statistical algorithm parameters. See the result of getDefaults("statistics", "bayseq") for an example and how you can modify it.

libsizeList

an optional named list where names represent samples (MUST be the same as the samples in sampleList) and members are the library sizes (the sequencing depth) for each sample. If not provided, they will be estimated from baySeq.

Details

Regarding object, apart from matrix (also for NOISeq), the object can be a SeqExpressionSet (EDASeq), CountDataSet (DESeq), DGEList (edgeR), DESeqDataSet (DESeq2), SeqCountSet (DSS) or ABSDataSet (ABSSeq).

Regarding contrastList it can also be a named structured list of contrasts as returned by the internal function metaseqR2:::makeContrastList.

Value

A named list of the value 1-likelihood that a gene is differentially expressed, whose names are the names of the contrasts.

Author(s)

Panagiotis Moulos

Examples

1
2
3
4
5
6
7
# Careful on testing, baySeq is slow
require(baySeq)
dataMatrix <- metaseqR2:::exampleCountData(10)
sampleList <- list(A=c("A1","A2"),B=c("B1","B2","B3"))
contrast <- "A_vs_B"
normDataMatrix <- normalizeEdger(dataMatrix,sampleList)
p <- statBayseq(normDataMatrix,sampleList,contrast)

metaseqR2 documentation built on Nov. 8, 2020, 7:34 p.m.