-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathannotate_cat.Rd
36 lines (30 loc) · 1.24 KB
/
annotate_cat.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/annotation.R
\name{annotate_cat}
\alias{annotate_cat}
\title{Generate colors and ids for categorical annotations}
\usage{
annotate_cat(df, col = NULL, base = NULL, sort_label = T,
na_val = "ZZ_Missing", colorset = "varibow", color_order = "sort")
}
\arguments{
\item{df}{data frame to annotate}
\item{col}{name of the character column to annotate}
\item{base}{base name for the annotation, which wil be used in the desc
table. If not provided, will use col as base.}
\item{sort_label}{a logical value to determine if the data in col should be
arranged alphanumerically before ids are assigned. default = T.}
\item{na_val}{The value to use to replace NAs. default = "ZZ_Missing".}
\item{colorset}{The colorset to use for assigning category colors. Options
are "rainbow","viridis","inferno","magma", and "terrain"}
\item{color_order}{The order in which colors should be assigned. Options are
"sort" and "random". "sort" assigns colors in order; "random" will randomly
assign colors.}
}
\value{
A modified data frame: the annotated column will be renamed
base_label, and base_id and base_color columns will be appended
}
\description{
Generate colors and ids for categorical annotations
}