NumericUtilities | R Documentation |
A set of function helper related to the statistical model
underlying the COTAN
package
funProbZero(dispersion, mu)
dispersionBisection(
sumZeros,
lambda,
nu,
threshold = 0.001,
maxIterations = 100L
)
parallelDispersionBisection(
genes,
sumZeros,
lambda,
nu,
threshold = 0.001,
maxIterations = 100L
)
nuBisection(
sumZeros,
lambda,
dispersion,
initialGuess,
threshold = 0.001,
maxIterations = 100L
)
parallelNuBisection(
cells,
sumZeros,
lambda,
dispersion,
initialGuess,
threshold = 0.001,
maxIterations = 100L
)
calcDist(data, method, diag = FALSE, upper = FALSE)
dispersion |
the estimated |
mu |
the |
sumZeros |
the number of genes not expressed in the relevant cell (a
|
lambda |
the estimated |
nu |
the estimated |
threshold |
minimal solution precision |
maxIterations |
max number of iterations (avoids infinite loops) |
genes |
names of the relevant genes |
initialGuess |
the initial guess for |
cells |
names of the relevant cells |
data |
a matrix or a data.frame of which we want to calculate the distance between columns |
method |
type of distance to use. Can be chosen among those supported by
|
diag |
logical value indicating whether the diagonal of the distance matrix should be printed by print.dist.upper |
upper |
logical value indicating whether the upper triangle of the distance matrix should be printed by print.dist |
funProbZero
is a private function that gives the probability that
a sample gene's reads are zero, given the dispersion
and mu
parameters.
Using d
for disp
and \mu
for mu
,
it returns:
(1 + d \mu)^{-\frac{1}{d}}
when d > 0
and
\exp{((d - 1) \mu)}
otherwise.
The function is continuous in d = 0
,
increasing in d
and decreasing in \mu
.
It returns 0 when d = -\infty
or
\mu = \infty
.
It returns 1 when \mu = 0
.
dispersionBisection
is a private function for the estimation of
dispersion
slot of a COTAN
object via a bisection solver
The goal is to find a dispersion
value that reduces to zero the
difference between the number of estimated and counted zeros
parallelDispersionBisection
is a private function invoked by
estimateDispersionBisection()
for the estimation of the dispersion
slot
of a COTAN
object via a parallel bisection solver
The goal is to find a dispersion
array
that reduces to zero the
difference between the number of estimated and counted zeros
nuBisection
is a private function for the estimation of nu
slot
of a COTAN
object via a bisection solver
The goal is to find a nu
value that reduces to zero the difference
between the number of estimated and counted zeros
parallelNuBisection
is a private function invoked by
estimateNuBisection()
for the estimation of nu
slot of a COTAN
object
via a parallel bisection solver
The goal is to find a nu
array
that reduces to zero the
difference between the number of estimated and counted zeros
calcDist
is a wrapper function that invokes
parallelDist::parDist()
: the main goal is to recover and finish the
calculations via a fallback when there is a problem with the main algorithm
the probability matrix
that a read count is identically zero
the dispersion
value
the dispersion values
the nu value
the dispersion values
a dist
object with all distances
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.