annotate_num: Generate colors and ids for numeric annotations. From...

annotate_numR Documentation

Generate colors and ids for numeric annotations. From library(scrattch.io)

Description

Generate colors and ids for numeric annotations. From library(scrattch.io)

Usage

annotate_num(df, col = NULL, base = NULL, scale = "log10",
  na_val = 0, colorset = c("darkblue", "white", "red"))

Arguments

df

data frame to annotate

col

name of the numeric column to annotate

base

base name for the annotation, which wil be used in the desc table. If not provided, will use col as base.

scale

The scale to use for assigning colors. Options are "linear","log10","log2, and "zscore"

na_val

The value to use to replace NAs. default = 0.

colorset

A vector of colors to use for the color gradient. default = c("darkblue","white","red")

Value

A modified data frame: the annotated column will be renamed base_label, and base_id and base_color columns will be appended


AllenInstitute/L5_VEN documentation built on July 31, 2022, 6:32 p.m.