set_annot_samps: Set Sample Annotations to Appear Along Top of Heatmaps

View source: R/params_functions.R View source: R/Package-Code5-Compiled.R

set_annot_sampsR Documentation

Set Sample Annotations to Appear Along Top of Heatmaps

Description

Specify which sample annotations should appear along the top of heatmaps

Usage

set_annot_samps(annotations = NULL)

Arguments

annotations

a character vector including the column names in the annotations parameter (set_annotations) that should be shown as annotations in the heatmap. If no argument is supplied, assumes that all columns in the annotations should be shown in the heatmap. For showing multiple annotations, the order in which the annotations are listed is the order they will appear on the heatmap from the closest to the heatmap on the bottom to those farthest on the top. To remove all annotation tracks and reset, simply set to NA.

Details

Draws from the annotations parameter stored in the params list object to hold only the annotations that should be shown in heatmaps. See set_annotations, must be run prior to this function.

To specify the colors that will accompany each level of each annotation, see set_annot_cols. If colors are not specified, default color values will be applied when necessary. (Not all annotations need to have custom colors, those that do not will be given default colors while those that are specified will be shown as such.)

Author(s)

~~Alison Moss~~

See Also

See set_annotations and set_annot_cols

Examples

##initiate parameters and annotations
initiate_params()
set_annotations(RAGP_annots)

##without setting annot_samps, no annotations will be shown in heatmap
myHeatmap(RAGP_norm)

##with no argument, assumes all annotations should be shown in heatmap
set_annot_samps()
myHeatmap(RAGP_norm)

##specify annotations to be shown in heatmap, first annotation will be shown closest to heatmap
set_annot_samps(c("Connectivity","Animal","State"))
myHeatmap(RAGP_norm)

axm323/dataVisEasy documentation built on Feb. 1, 2024, 11:53 p.m.