View source: R/normalize_counts.R
NullModel | R Documentation |
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.
NullModel(x, type = c("mle", "deseq", "quantile", "none", "tmm")) NullModelTest(null.out, xte = NULL)
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. |
a list with the normalized counts and the training set parameters that are used for normalizing the raw counts.
These functions are copied from the PoiClaClu
package and modified here to make "tmm" and "none" methods available.
Dincer Goksuluk
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.