rwDataClass-class {ramwas} | R Documentation |
This class is a wrapper for accessing the data (coverage) matrix. It automatically subsets the samples to those listed in the covariates. Data access function imputes missing values and can residualize the variables.
rwDataClass
is a reference classes
(see envRefClass
).
fmdata
:Filematrix object for the data matrix.
Not intended to be accessed directly.
samplenames
:Vector of sample names.
nsamples
:Number of samples
ncpgs
:Number of variables (CpG sites) in the data matrix.
ndatarows
:Number of variables in the data matrix (may be bigger than the number of samples).
rowsubset
:Indices of samples in the data matrix.
cvrtqr
:Matrix of orthonormalized covariates.
initialize(param = NULL, getPCs = TRUE, lockfile = NULL)
:Create the data access class.
'param' should contain the RaMWAS parameter vector.
'getPCs' indicates if the covariate set should include
Principal components.
'lockfile' is the 'lockfile' parameter used in accessing the
data filematrix.
open(param = NULL, getPCs = TRUE, lockfile = NULL)
:The same as 'initialize' method, but for already created object.
close()
:Clears the object. Closes the filematrix.
getDataRez(colset, resid = TRUE)
:Extracts data for variables indexed by 'colset'.
The data is residualized unless resid = FALSE
.
Andrey A Shabalin andrey.shabalin@gmail.com
See vignettes: browseVignettes("ramwas")
# Create an empty rwDataClass data = new("rwDataClass") ## Not run: # Connect to the data data$open(param) # Create a rwDataClass and connect to the data data = new("rwDataClass", param = param) # close the object data$close() ## End(Not run)