iSet-class {Cardinal} | R Documentation

## iSet: Class to contain high-throughput imaging experiment data and metadata

### Description

A container class for data from high-throughput imaging experiments and associated metadata. Classes derived from from `iSet` contain one or more arrays or array-like objects with an equal number of dimensions as `imageData` elements. It is assumed that the first dimension of each such element corresponds to the data features, and all other dimensions are described by associated coordinates in the `pixelData` slot. Otherwise, derived classes are responsible for managing how the elements of `imageData` behave and their relationship with the rows of `pixelData` and `featureData`.

The `MSImageSet` class for mass spectrometry imaging experiments is the primary derived class of `iSet`. Its parent class `SImageSet` is another derived class for more general images.

This class is based on the `eSet` virtual class from Biobase. However, the `iSet` class contains an `imageData` slot which is an 'immutableEnvironment' that preserves copy-on-write behavior for `iSet` derived classes, but only copying elements of `imageData` when that slot specifically is modified. In addition `pixelData` is an `IAnnotatedDataFrame` that stores pixel information such as pixel coordinates in addition to phenotypic data.

### Slots

`imageData`:

  An instance of `ImageData`, which stores one or more array or array-like objects of equal number of dimensions as elements in an 'immutableEnvironment'. This slot preserves copy-on-write behavior when it is modified specifically, but is pass-by-reference otherwise, for memory efficiency.

`pixelData`:

  Contains pixel information in an `IAnnotatedDataFrame`. This includes both pixel coordinates and phenotypic and sample data. Its rows correspond to individual pixels, many of which may belong to the same sample. Apart a requirement on columns describing the pixel coordinates, it is left to derived classes to decide the relationship to elements of `imageData`.

`featureData`:

  Contains variables describing features. It Is left to derived classes to decide the relationship to elements of `imageData`.

`experimentData`:

  Contains details of experimental methods. Should be an object of a derived class of `MIAxE`.

`protocolData`:

  Contains variables describing the generation of the samples in `pixelData`.

`.__classVersion__`:

  A `Versions` object describing the version of the class used to created the instance. Intended for developer use.

### Extends

`VersionedBiobase`, directly. `Versioned`, by class "VersionedBiobase", distance 2.

### Creating Objects

`iSet` is a virtual class. No instances can be created.

### Methods

Class-specific methods:

`sampleNames(object), sampleNames(object) <- value`:

  Access and set the sample names in the `pixelData` and `protocolData` slots.

`featureNames(object), featureNames(object) <- value`:

  Access and set the feature names in the `featureData` slot.

`pixelNames(object), pixelNames(object) <- value`:

  Access and set the pixel names in the `pixelData` slot.

`coordLabels(object), coordLabels(object) <- value`:

  Access and set the coordinate names described by the coordinate variables in the `pixelData` slot. Note that this does not set or get coordinate names with a `labelType` of `sample`, regardless of whether they are currently being used to describe coordinates or not. Therefore, checking `coordLabels(object)` versus `names(coord(object))` is a simple way of checking whether a dataset is 2D or 3D.

`coord(object)`, `coord(object)<-`:

  Return or set the coodinates. This is a `data.frame` containing the subset of columns of `data` for which the variables have a 'labelType' of 'dim'.

`imageData(object), imageData(object) <- value`:

  Access and set the `imageData` slot.

`pixelData(object), pixelData(object) <- value`:

  Access and set the `pixelData` slot.

`pData(object), pData(object) <- value`:

  Access and set the pixel information.

`varMetadata(object), varMetadata(object) <- value`:

  Access and set the metadata describing the variables in `pData`.

`varLabels(object), varLabels(object) <- value`:

  Access and set the variable labels in `pixelData`.

`featureData(object), featureData(object) <- value`:

  Access and set the `featureData` slot.

`fData(object), fData(object) <- value`:

  Access and set the feature information.

`fvarMetadata(object), fvarMetadata(object) <- value`:

  Access and set the metadata describing the features in `fData`.

`fvarLabels(object), fvarLabels(object) <- value`:

  Access and set the feature labels in `featureData`.

`features(object, ...)`:

  Access the feature indices (rows in `featureData`) corresponding to variables in `featureData`.

`pixels(object, ...)`:

  Access the pixel indices (rows in `pixelData`) corresponding to variables in `pixelData`.

`experimentData(object), experimentData(object) <-`:

  Access and set the `experimentData` slot.

`protocolData(object), protocolData(object) <-`:

  Access and set the `protocolData` slot.

`storageMode(object), storageMode(object)<-`:

  Return or set the storage mode of the `imageData` slot. See documentation on the `storageMode` slot above for more details.

Standard generic methods:

`initialize`:

  Initialize a object of an `iSet` derived class. Called by `new`. Not to be used by the user.

`validObject`:

  Checks that there exist columns in `pixelData` describing the pixel coordinates, cooresponding to the dimensions of the elements of `imageData`. For every named dimension of the arrays on `imageData` there must be a `pData` column describing its pixel coordinates. Also checks that the `sampleNames` match between `pixelData` and `protocolData`.

`combine(x, y, ...)`:

  Combine two or more `iSet` objects. To be combined, iSets must have identical `featureData` and distinct `pixelNames` and `sampleNames`. All elements of `imageData` must have matching names. Elements of `imageData` are combined by calls for `combine`.

`dim`:

  The dimensions of the object, as determined by the number of features (rows in featureData) and the number of pixels (rows in pixelData). This may differ from the dimensions returned by `dims(object)` (which corresponds to the arrays in `data`) or returned by `dim(imageData(object))`. See `SImageSet` for an example where this is the case, due to its use of a "virtual" datacube.

`dims`:

  A matrix with each column corresponding to the dimensions of an element in the `data` slot.

`iSet$name, iSet$name <- value`:

  Access and set the `name` column in `pixelData`.

`iSet[[i, ...]], iSet[[i, ...]] <- value`:

  Access and set the column `i` (character or numeric index) in `pixelData`. The ... argument can include named variables (especially 'labelDescription') to be added to the `varMetadata`.

### Author(s)

Kylie A. Bemis

### See Also

`eSet`, `SImageSet`, `MSImageSet`

### Examples

    ## Cannot create an iSet object
    try(new("iSet"))

    ## Create an iSet derived class
    MyImageSet <- setClass("MyImageSet", contains="iSet")
    MyImageSet()

    removeClass("MyImageSet")

[Package Cardinal version 2.2.6 Index]