rscharpf/oligoClasses — Issue #3: integer assay data elements
Author: rscharpf
Created: 2012-02-15 13:44:06+00:00
State: open

It makes sense to store copy number, b allele frequencies, etc as integers even if using ff objects. For example, with the ff implementation, subsetting operations that pull data from disk to RAM will be quicker if the ff objects are smaller.

The question is how best to do that.

1. Add an is.integer slot to the oligoSnpSet, gSet classes currently defined in oligoClasses. In general, I do not think we want the accessorts to baf(), copyNumber(), lrr(), etc to automatically put this data back on the original scale. It would then be up to the methods defined for the class to check the is.integer slot before doing any operation that requires the assay data elements to be on the appropriate scale.

2. Define a new class that requires integers. For, example

setClass("oligoSnpSetInteger", contains="oligoSnpSet")

and then define methods for oligoSnpSetInteger when appropriate. For example, the methods for oligoSnpSetInteger could do the coercion to numeric and then use callNextMethod. A setValidity for these classes would require that all of the assayData elements are integers.

3. A third possibility is to require that the basic classes gSet, oligoSnpSet, etc store assay data elements as integers. A numeric representation is never allowed.