S3 classes are just named lists with a class name assigned to them. A provoc class would just be a named list, but then the generic summary() function of on a provoc object would look for a function named summary.provoc().
Below is an idea for what entries those lists might contain.
coefficient: The estimated proportions.
standard_error: The estimated standard error (NA if no bootstrapping)
variant_matrix: The variant matrix used.
This will include the names of the variants as well as the names of the mutations.
count and coverage from the original data.
This may be too much? Not sure if we need all of the data as part of the model object.
sample: The sample identifier if there were multiple samples in one run (see Baaijens vignette).
Anything that was constant in each sample, e.g. the date or location, should be retained. Again, this should not be retained if we choose not to retain all of the data (but the sample identifier is important).
Convergence information (directly from constrOptim()).
call: The call used to fit the model (including all inputs, not just the formula).
TODO: Check the entries in lm and glm objects to see what they contain. (Initial check: lmdoes contain a copy of the original data that was required to fit the model, but not other parts of the data. They also contain the residuals, and some lm specific info.)
S3 classes are just named lists with a class name assigned to them. A
provoc
class would just be a named list, but then the genericsummary()
function of on aprovoc
object would look for a function namedsummary.provoc()
.Below is an idea for what entries those lists might contain.
coefficient
: The estimated proportions.standard_error
: The estimated standard error (NA if no bootstrapping)variant_matrix
: The variant matrix used.count
andcoverage
from the original data.sample
: The sample identifier if there were multiple samples in one run (see Baaijens vignette).constrOptim()
).call
: The call used to fit the model (including all inputs, not just the formula).TODO: Check the entries in
lm
andglm
objects to see what they contain. (Initial check:lm
does contain a copy of the original data that was required to fit the model, but not other parts of the data. They also contain the residuals, and somelm
specific info.)