NullModel {NBLDA} | R Documentation |
Calculate the Normalized Counts and Related Training Parameters.
Description
Fit a training set to the NBLDA model and estimate normalized counts. The related model parameters, which are used while normalizing training sets, are also returned to normalize test sets using training set parameters.
Usage
NullModel(x, type = c("mle", "deseq", "quantile", "none", "tmm"))
NullModelTest(null.out, xte = NULL)
Arguments
x |
an n-by-p data frame or matrix of count data. Samples should be in the rows. |
type |
the normalization method. See |
null.out |
an object returned from |
xte |
an n-by-p count matrix or data frame of test set. These counts are normalized using the training set parameters. |
Value
a list with the normalized counts and the training set parameters that are used for normalizing the raw counts.
Note
These functions are copied from the PoiClaClu
package and modified here to make "tmm" and "none" methods available.
Author(s)
Dincer Goksuluk
Examples
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.
[Package NBLDA version 1.0.1 Index]