sampleLabels {CAGEr} | R Documentation

## Get and set sample labels

### Description

`sampleLabels` gets or sets the labels and colors of CAGE datasets (samples) from `CAGEr` objects.

`sampleList` is an accessory function for convenience iteration in functions such as `lapply` or `mapply`. There is no set method for `sampleList`.

### Usage

    sampleLabels(object)

    ## S4 method for signature 'CAGEset'
    sampleLabels(object)

    ## S4 method for signature 'CAGEexp'
    sampleLabels(object)

    ## S4 method for signature 'CTSS'
    sampleLabels(object)

    sampleList(object)

    ## S4 method for signature 'CAGEr'
    sampleList(object)

    sampleLabels(object) <- value

    ## S4 replacement method for signature 'CAGEset'
    sampleLabels(object) <- value

    ## S4 replacement method for signature 'CAGEexp'
    sampleLabels(object) <- value

    ## S4 replacement method for signature 'CTSS'
    sampleLabels(object) <- value

### Arguments

`object` | A CAGEr object.
`value` | A character vector with a unique and valid name for each sample. The `names` attributes indicate the colors.

### Details

In `CAGEexp` objects, renaming samples is possible only before data is loaded.

### Value

`sampleLabels` returns a named character vector representing labels of all CAGE datasets present in the CAGEr object. The vector values are the labels and the vector names are the colors.

`sampleList` returns a named list where elements and their names are the sample names, for instance: `list(sampleA = "sampleA", sampleB = "sampleB")`. Thus, after iterating on it with `lapply`, the element names will be sample names.

### Note

If no colors are supplied, then default colors will be assigned usign the `rainbow` function. Assigned colors are not guaranteed to be stable.

### Author(s)

Vanja Haberle

Charles Plessy

### See Also

`setColors`

Other CAGEr accessor methods: `CTSSclusteringMethod`, `CTSScoordinates`, `CTSScumulativesTagClusters`, `CTSSnormalizedTpm`, `CTSStagCountTable`, `CTSStagCount`, `GeneExpDESeq2`, `GeneExpSE`, `consensusClustersGR`, `genomeName`, `inputFilesType`, `inputFiles`, `librarySizes`, `seqNameTotalsSE`, `tagClusters`

Other CAGEr setter methods: `genomeName`, `inputFilesType`, `inputFiles`, `setColors`

### Examples

    sampleLabels(exampleCAGEset)

    sampleList(exampleCAGEset)

[Package CAGEr version 1.30.3 Index]