NullModel: Calculate Normalized Counts and Related Training Parameters.

Description Usage Arguments Value Note Author(s) Examples

View source: R/normalize_counts.R

Description

Fit training set to NBLDA model and estimate normalized counts. The related model parameters which are used while normalizing training sets are also returned in order to normalize test sets using training set parameters.

Usage

1
2
3
NullModel(x, type = c("mle", "deseq", "quantile", "none", "tmm"))

NullModelTest(null.out, xte = NULL)

Arguments

x

a n-by-p data frame or matrix of count data. Samples should be in the rows.

type

normalization methods. See control for details.

null.out

an object returned from NullModel.

xte

a n-by-p count matrix or data frame of test set. These counts are normalized using training set parameters.

Value

a list with normalized counts and training set parameters used for normalizing raw counts.

Note

These functions are copied from PoiClaClu package and modified here to make "tmm" and "none" methods available.

Author(s)

Dincer Goksuluk

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
set.seed(2128)
counts <- generateCountData(n = 20, p = 10, K = 2, param = 1, sdsignal = 0.5, DE = 0.8,
                            allZero.rm = FALSE, tag.samples = TRUE)
x <- counts$x
xte <- counts$xte

x.out <- NullModel(x, "mle")
x.out$n ## Normalized counts using "mle" method

xte.out <- NullModelTest(x.out, xte)
xte.out$n  # Normalized counts for test set using train set parameters.

NBLDA documentation built on May 2, 2019, 12:21 p.m.