CyData-getset {cydar} | R Documentation

## CyData getters and setters

### Description

Methods to get and set data slots in the CyData object.

### Usage

    ## S4 method for signature 'CyData'
    markerData(x)
    ## S4 replacement method for signature 'CyData'
    markerData(x) <- value

    ## S4 method for signature 'CyData'
    intensities(x)
    ## S4 replacement method for signature 'CyData'
    intensities(x) <- value

    ## S4 method for signature 'CyData'
    cellAssignments(x)
    ## S4 replacement method for signature 'CyData'
    cellAssignments(x) <- value

    ## S4 method for signature 'CyData'
    cellIntensities(x)
    ## S4 replacement method for signature 'CyData'
    cellIntensities(x) <- value

    ## S4 method for signature 'CyData'
    cellData(x)
    ## S4 replacement method for signature 'CyData'
    cellData(x) <- value

    ## S4 method for signature 'CyData'
    nmarkers(x)
    ## S4 method for signature 'CyData'
    ncells(x)

    ## S4 method for signature 'CyData'
    markernames(object)
    ## S4 replacement method for signature 'CyData'
    markernames(object) <- value

    ## S4 method for signature 'CyData'
    sampleNames(object)
    ## S4 replacement method for signature 'CyData'
    sampleNames(object) <- value

### Arguments

`x, object` | A CyData object.
`value` | For `markernames` and `sampleNames`, a character vector specifying the names of the markers and samples, respectively. Otherwise, an appropriate object to use to replace the corresponding slot of `x`.

### Details

`markerData`, `intensities`, `cellAssignments`, `cellIntensities` and `cellData` are methods to get or set the slots in a CyData object. general, setting should not be performed unless adding annotation for particular markers or cells (or if you really know what you're doing). Caution is especially advised when using `cellIntensities<-` and/or `cellData<-`, as several methods in this package rely on a particular ordering of cells.

Several convenience functions are also provided. `nmarkers` will return the number of markers, while `ncells` will return the number of cells. `markernames` will return the marker names (i.e., the row names of `markerData`), while `sampleNames` will return the sample names (i.e., the column names of `object`). The respective replacement functions will modify these names.

### Value

For the setters, a new CyData object will be generated with modified entries for the appropriate slots. For the getters, an object of the class corresponding to each slot will be returned. `nmarkers` and `ncells` will return integer scalars, while `markerNames` and `sampleNames` will return character vectors.

### Author(s)

Aaron Lun

### Examples

    example(CyData) # Mocking up an object.

    nmarkers(cyd)
    markernames(cyd)
    sampleNames(cyd)

    markerData(cyd)
    markerData(cyd)$stuff <- runif(nmarkers(cyd))
    markerData(cyd)

    head(intensities(cyd))
    cellIntensities(cyd)[,1:10]

[Package cydar version 1.4.0 Index]