itol_simplebar: create itol simple-bar file

View source: R/itol.R

itol_simplebarR Documentation

create itol simple-bar file

Description

https://itol.embl.de/help.cgi#bar

Usage

itol_simplebar(
  df,
  dataset_label,
  out_file = "itol_simplebar.txt",
  out_dir = getwd(),
  legend = NULL,
  WIDTH = 200
)

Arguments

df

A data.frame, tibble, or data.table (see above)

dataset_label

What to label the itol dataset

out_file

Name of the output file

out_dir

Where to write the output

legend

Specify particular legend (see itol_colorstrip)

WIDTH

Bar width

Details

If a data.frame is provided, the row names must exactly match the tree node labels. The 1st column with be used for plotting. If a data.table or tibble is provided, the first column values must exactly match the tree node labels. The 2nd column will be used for plotting.

Examples

# data.frame input
df = data.frame(values = c(1,1,2), row.names = LETTERS[1:3])
itol_simplebar(df, 'test_label')
# data.table
dt = data.table(taxa = LETTERS[1:3], values = c(1,1,2))
itol_simplebar(dt, 'test_label')

leylabmpi/LeyLabRMisc documentation built on Nov. 3, 2022, 3:45 p.m.