Objects can be created by calls of the form
new("ExomeDepth", data = NULL, test, reference, formula = 'cbind(test, reference) ~ 1', subset.for.speed = NULL)
. data
is optional and is
only used if the formula
argument refers to covariates (in which case
these covariates must be included in the data frame). test
and
reference
refer to the read count data for the test and reference
samples.
Critically, it is not required to store the positions of the DNA fragments
that led to the test and reference counts. That is only required for the
function TestCNV
. If this is of use, a GRanges object can be provided
using the argument positions
.
Creating a ExomeDepth object will automatically fit the
beta-binomial model (using routines from the aod
package) and compute
the likelihood for the three copy number states (normal, deletion and
duplication).