setColors: Set colors for samples

setColorsR Documentation

Set colors for samples

Description

Assigns one color to each sample in the CAGEr object. These colors are used in various plots and exported tracks to consistently represent corresponding samples.

Usage

setColors(object, colors = NULL)

## S4 method for signature 'CAGEr'
setColors(object, colors = NULL)

Arguments

object

A CAGEr object.

colors

A character vector of one valid R color specification per sample (see col2rgb for details). Provided colors are assigned to samples in the order they are returned by the sampleLabels function.

Value

Assigns one color to each sample in the CAGEr object and modifies it in place.

Author(s)

Vanja Haberle

See Also

Other CAGEr setter methods: genomeName(), inputFilesType(), inputFiles(), sampleLabels()

Examples


sampleLabels(exampleCAGEexp)
setColors(exampleCAGEexp, 5)
sampleLabels(exampleCAGEexp)
setColors(exampleCAGEexp, c("#ff0000ff", "#CCFF00", "blue", "grey", 1))
sampleLabels(exampleCAGEexp)
setColors(exampleCAGEexp, c("red", "darkgreen", "blue", "grey", "black"))
sampleLabels(exampleCAGEexp)


charles-plessy/CAGEr documentation built on Nov. 4, 2023, 11:57 a.m.