rwDataClass-class: Class for Accessing Data (Coverage) Matrix

Description Extends Fields Methods Author(s) See Also Examples

Description

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.

Extends

rwDataClass is a reference classes (see envRefClass).

Fields

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.

Methods

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.

Author(s)

Andrey A Shabalin andrey.shabalin@gmail.com

See Also

See vignettes: browseVignettes("ramwas")

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# 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)

ramwas documentation built on Nov. 8, 2020, 8:24 p.m.