get_evofreq_labels: get_evofreq_labels

Description Usage Arguments Value Examples

View source: R/EvoFreq_funcs.R

Description

get_evofreq_labels

Usage

1
2
3
get_evofreq_labels(freq_frame, apply_labels = FALSE,
  custom_label_text = NULL, evofreq_plot = NULL, clone_list = NULL,
  extant_only = FALSE, line_color = "darkgrey", adj.factor = 10)

Arguments

freq_frame

Properly formatted dataframe from get_evofreq.

apply_labels

Whether to plot the labels. Must include evofreq_plot if TRUE. Default FALSE.

custom_label_text

Custom labels to use (e.g. c("Mutant X","Mutant Y"))

evofreq_plot

Plot returned from plot_evofreq.

clone_list

Only label clones with this id. Passed as a vector.

extant_only

Get labels for only the extant clones.

line_color

Single color value. Default "black".

adj.factor

Value to scale the label and lines by so that they are far enough from the plot. Default value is 10 (a 10th of the distance between max/min at x from max/min across x).

Value

Dataframe containing the necessary coordinates to add labels in the proper locations.

Examples

1
2
3
4
5
6
7
8
data("example.easy.wide") # Load Data
### Get frequency dataframe
freq_frame <- get_evofreq(example.easy.wide[,seq(3,10)], example.easy.wide$clones, example.easy.wide$parents, clone_cmap = "magma")
evofreq_plot <- plot_evofreq(freq_frame)
clone_labels <- get_evofreq_labels(freq_frame, extant_only=FALSE)

### Set evofreq_plot and apply_labels = TRUE to get a labeled plot back
get_evofreq_labels(freq_frame, extant_only=FALSE, evofreq_plot = evofreq_plot, apply_labels = TRUE)

MathOnco/EvoFreq documentation built on Jan. 26, 2022, 7:31 p.m.