normalize.nbpseq: Normalization based on the NBPSeq package

Description Usage Arguments Value Author(s) Examples

View source: R/metaseqr.norm.R

Description

This function is a wrapper over DESeq normalization. It accepts a matrix of gene counts (e.g. produced by importing an externally generated table of counts to the main metaseqr pipeline).

Usage

1
2
3
    normalize.nbpseq(gene.counts, sample.list,
        norm.args = NULL, libsize.list = NULL,
        output = c("matrix", "native"))

Arguments

gene.counts

a table where each row represents a gene and each column a sample. Each cell contains the read counts for each gene and sample. Such a table can be produced outside metaseqr and is imported during the basic metaseqr workflow.

sample.list

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

norm.args

a list of NBPSeq normalization parameters. See the result of get.defaults("normalization", "nbpseq") for an example and how you can modify it.

libsize.list

an optional named list where names represent samples (MUST be the same as the samples in sample.list) and members are the library sizes (the sequencing depth) for each sample. If not provided, the default is the column sums of the gene.counts matrix.

output

the class of the output object. It can be "matrix" (default) for versatility with other tools or "native" for the NBPSeq native S4 object (a specific list). In the latter case it should be handled with suitable NBPSeq methods.

Value

A matrix with normalized counts or a list with the normalized counts and other NBPSeq specific parameters.

Author(s)

Panagiotis Moulos

Examples

1
2
3
4
5
6
7
require(DESeq)
data.matrix <- counts(makeExampleCountDataSet())
sample.list <- list(A=c("A1","A2"),B=c("B1","B2","B3"))
diagplot.boxplot(data.matrix,sample.list)

norm.data.matrix <- normalize.nbpseq(data.matrix,sample.list)
diagplot.boxplot(norm.data.matrix,sample.list)

pmoulos/metaseqR documentation built on Dec. 21, 2020, 6:19 a.m.