scRNAseq Normalization
Types
SeqSpace.Normalize.FitType — TypeFitType = NamedTuple{
(
:likelihood,
:parameters,
:uncertainty,
:residual
),
Tuple{Float64, Vector{Float64}, Vector{Float64}, Vector{Float64}}Stores the result of MLE fit of one gene.
Functions
SeqSpace.Normalize.bootstrap — Methodbootstrap(count, depth; stochastic=negativebinomial, samples=50)Empirically verify the MLE fit of count, using a GLM model generated by stochastic with confounding depth variables by bootstrap. One third of cells are removed and the parameters are re-estimated with the remaining cells. This process is repeated samples times. The resultant distribution of estimation is returned.
SeqSpace.Normalize.fit — Methodfit(stochastic, count, depth)Fit a generative model stochastic to gene expression count data, assuming confounding sequencing depth. stochastic can be either negativebinomial or gamma.
SeqSpace.Normalize.gamma — Methodgamma(count, depth)Compute the log likelihood of a gamma distributed generalized linear model (GLM) with log link function for the estimated mean count of a single gene. The sequencing depth for each sequenced cell is assumed to be the only confounding variables.
SeqSpace.Normalize.glm — Methodglm(data; stochastic=negativebinomial, ϵ=1)Fit a generalized linear model (GLM) to the matrix data. Genes are assumed to be on rows, cells over columns. The underlying generative model is passed by stochastic.
SeqSpace.Normalize.logmean — Functionlogmean(x;ϵ=1)Compute the geometric mean: $xp\left(\langle \log\left(x + \epsilon \right) \rangle\right) - \epsilon$
SeqSpace.Normalize.logvar — Functionlogmean(x;ϵ=1)Compute the geometric variance: $exp\left(\langle \log\left(x + \epsilon \right)^2 \rangle_c\right) - \epsilon$
SeqSpace.Normalize.negativebinomial — Methodnegativebinomial(count, depth)Compute the log likelihood of a negative binomial generalized linear model (GLM) with log link function for count of a single gene. The sequencing depth for each sequenced cell is assumed to be the only confounding variables.
SeqSpace.Normalize.prior — Methodprior(params)Estimate a generalized normal distribution to params by maximum likelihood estimation. In practice, used to compute the empirical prior for overdispersion factor Θ₃ in the negative binomial.