Based on the counts from countReads, sample counts from the set
several times, estimate the parameters of the negative binomial distribution
for each sample, then calculate the mean of the parameters (size and
mu). Use these values to calculate the read count threshold, given
the specified p-value threshold.
A GreyList object for which to calculate
the threshold.
reps
The number of times to sample bins and estimate the parameters
of the negative binomial distribution.
sampleSize
The number of bins to sample on each repetition.
p
The p-value threshold for marking bins as ``grey''.
cores
The number of CPU cores (parallel threads) to use when
sampling repeatedly from the set of counts
Value
GreyList object, with the threshold added.
Details
This method samples from the set of counts generated during the
countReads step. Each sample is fitted to the negative binomial
distribution, and the parameters estimated. The means of the mu
and size parameters is calculated, then used to choose a read count
threshold, given the p-value cutoff provided. If cores is given,
the process will use that many cores to parallelize the parameter estimation.
References
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S.
Fourth edition. Springer.