itol_heatmap: create itol heatmap file

View source: R/itol.R

itol_heatmapR Documentation

create itol heatmap file

Description

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

Usage

itol_heatmap(
  df,
  dataset_label,
  out_file = "itol_heatmap.txt",
  out_dir = getwd(),
  tree = NULL,
  dist_method = "bray",
  color_scheme = c("color", "bw")
)

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

tree

Tree object used for ordering the heatmap columns; if NULL, the dist_method will be used to create the tree

dist_method

vegan::vegdist method for creating the correlation dendrogram

color_scheme

Heatmap color scheme. color = blue-orange-yellow; bw=white-grey-black

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. All other columns are assumed to be values for plotting.

Examples

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

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