rwDataClass-class {ramwas} | R Documentation

## Class for Accessing Data (Coverage) Matrix

### 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

    # 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)

[Package ramwas version 1.18.0 Index]