Description Usage Arguments Details Value Author(s) References Examples
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.
1 | calcThreshold(obj, reps=100, sampleSize=30000, p=0.99,cores=1)
|
obj |
A |
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 |
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.
The modified GreyList
object, with the threshold added.
Gord Brown
Venables, W. N. and Ripley, B. D. (2002) Modern Applied Statistics with S. Fourth edition. Springer.
1 2 3 4 5 | # Load a pre-built R object with counts.
data(greyList)
# Calculate the threshold:
gl <- calcThreshold(greyList,reps=10,sampleSize=1000,p=0.99,cores=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.