Description Usage Arguments Value Examples
View source: R/PRIOR_FUNCTIONS.R
Estimating parameters of the prior distribution for each gene by maximizing marginal distribution: 1D (optimize with respect to size using MME estimate of mu, 2D (optimize with respect to both mu and size)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Data |
A matrix of single-cell expression where rows
are genes and columns are samples (cells). |
BETA_vec |
A vector of capture efficiencies (probabilities) of cells. |
INITIAL_MU_vec |
Mean expression of genes,
can be estimated from |
INITIAL_SIZE_vec |
size of genes (size is a parameter in NB distribution), can come from EstPrior. |
MU_lower |
The lower bound for the mu.(Only need it when you want to do 2D optimization). Default is 0.01. |
MU_upper |
The upper bound for the mu.(Only need it when you want to do 2D optimization). Default is 500. |
SIZE_lower |
The lower bound for the size. Default is 0.01. |
SIZE_upper |
The upper bound for the size. Default is 30. |
parallel |
If TRUE, |
NCores |
number of cores to use, default is 5. This will be used to set up a parallel environment using either MulticoreParam (Linux, Mac) or SnowParam (Windows) with NCores using the package BiocParallel. |
FIX_MU |
If TRUE, then 1D optimization, otherwise 2D optimization (slow). |
GR |
If TRUE, the gradient function will be used in optimization. However since the gradient function itself is very complicated, it does not help too much in speeding up. Default is FALSE. |
BB estimated size (1D optimization) or size and mu (2D optimization).
1 2 3 4 5 6 7 | data('EXAMPLE_DATA_list')
BB_RESULT<-BB_Fun(Data=EXAMPLE_DATA_list$inputdata[,seq(1,30)],
BETA_vec = EXAMPLE_DATA_list$inputbeta[seq(1,30)],
INITIAL_MU_vec=EXAMPLE_DATA_list$mu,
INITIAL_SIZE_vec=EXAMPLE_DATA_list$size,
MU_lower=0.01,MU_upper=500,SIZE_lower=0.01,
SIZE_upper=30,parallel=FALSE,NCores=5,FIX_MU=TRUE,GR=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.