Learn R Programming

AMAP.Seq (version 1.0)

MGN.EM: Estimate the mixture gamma-normal (MGN) distribution using expectation-maximization (EM) algorithm

Description

the MGN distribution model the joint distribution, pi(lambda,delta), by a K-component MGN distribution, and allows degenerate normal for delta when the null hypothesis is simple.

Usage

MGN.EM(data, nK, p0 = NULL, d0 = 0, nK0 = 0, iter.max = 10, print.steps = FALSE, MGN0 = NULL, model = NULL, nMC = 10000)

Arguments

data
the RNA-seq data, should be the output from RNASeq.Data
nK
the number of components in MGN. When testing for fold-changes (FC), nK includes all components, when testing for differential expression (DE), nK only includes the components that are NOT degenerated.
p0
the proportion of null genes when testing for DE genes.
d0
the point where 'delta' is degerated, default is 0 when testing for DE genes.
nK0
the number of components that are degenerated when testing for DE genes.
iter.max
maximium number of interations in the EM algorithm
print.steps
print the esimates of MGN in each iteration step, if TRUE. Default is FALSE
MGN0
The initialization of the MGN. It should be a data.frame with 5 columns: pr, alpha, beta, mu, sigma. The methods of moment estimation will be used if not provided.
model
data model, can be 'nbinom' or 'poisson'. the default will be the same as in 'data'
nMC
the number of random samples from Gamma and Normal distrubitons in the Monte-Carlo simulation.

Value

  • MGNThe estimated MGN distribution, as a data.frame with 5 columns: pr, alpha,beta,mu,sigma. pr: the proportion (weight) of each component \ alpha: alpha in the Gamma distribution \ beta: beta in the Gamma distribution \ mu: mu (mean) of the Normal distribution\ sigma: sigma (standard deviation) of the Normal distribution. sigma=0 is allowed for degenerated Normal
  • lamthe shrinked estimation of lambda (mean expression for each gene)
  • delthe shrinked estimation of delta (log-fold change) for each gene

Examples

Run this code
#### see examples by typing 'help(test.AMAP)'

Run the code above in your browser using DataLab