selectionColorMap: Define the selection colormap

columnSelectionColorMapR Documentation

Define the selection colormap

Description

Define the colormap when coloring points in a DotPlot based on their assigned multiple row/column selection.

Usage

columnSelectionColorMap(x, levels)

rowSelectionColorMap(x, levels)

Arguments

x

An ExperimentColorMap object.

levels

Character vector containing the available levels of a ColorBy column derived from a series of multiple selections, usually generated by multiSelectionToFactor on the selection information in row_selected or col_selected.

Details

The "unselected" level is always assigned the grey color; colors for all other levels are generated by colDataColorMap(x) or rowDataColorMap(x). The "active" level is always assigned the first color from these functions, regardless of whether it is present in levels. This aims to provide some consistency in the coloring when the selections change.

Value

A named character vector of colors for each level in levels.

Author(s)

Aaron Lun

Examples

ecm <- ExperimentColorMap()
columnSelectionColorMap(ecm, c("active", "unselected"))
columnSelectionColorMap(ecm, c("active", "saved1", "unselected"))
columnSelectionColorMap(ecm, c("saved1", "unselected"))
columnSelectionColorMap(ecm, c("saved1"))


csoneson/SEE documentation built on Dec. 13, 2024, 6:43 p.m.