itol_symbol: create itol symbol file

View source: R/itol.R

itol_symbolR Documentation

create itol symbol file

Description

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

Usage

itol_symbol(
  df,
  dataset_label,
  out_file = "itol_symbol.txt",
  out_dir = getwd(),
  MAXIMUM_SIZE = 50,
  COLOR = "#ff0000"
)

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

MAXIMUM_SIZE

The max size of the symbols

COLOR

Legend color

Details

If a data.frame is provided, the row names must exactly match the tree node labels. If a data.table or tibble is provided, the first column values must exactly match the tree node labels. Columns in the table must include: symbol,size,color,fill,position,(label)

Examples

# data.frame
df = data.frame(symbol = c(3,1), size = c(5,10), color = c('#0000ff', '#00ff00'), fill = c(0,1), position = c(0, 0.5), row.names = LETTERS[1:2])
itol_symbol(df, 'test_label')
# data.table
dt = data.table(taxa = LETTERS[1:2], symbol = c(3,1), size = c(5,10), color = c('#0000ff', '#00ff00'), fill = c(0,1), position = c(0, 0.5))
itol_symbol(dt, 'test_label')

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