learn_theme_strip_label {itol.toolkit}R Documentation

Learn strip label

Description

learn strip label paramters as list

Usage

learn_theme_strip_label(lines, sep)

Arguments

lines

a vector of character strings from template file.

sep

a charactor specifying the separator.

Value

a list of strip label parameters containing

display

0/1 specifying display or hide the individual label inside each colored strip (when defined in the data below)

width

a number specifying width of the colored strip

size

a number specifying strip label size factor (relative to the tree leaf labels)

color

define colors for each strip label element (use hexadecimal, RGB or RGBA notation; if using RGB/RGBA, COMMA cannot be used as SEPARATOR)

color_branches

1/0 specifying branches of the tree will or not be colored according to the colors of the strips above the leaves. When all children of a node have the same color, it will be colored the same, ie. the color will propagate inwards towards the root.

position

a character specifying position of the strip label within the box; 'top', 'center' or 'bottom'

shift

a number specifying strip label shift in pixels (positive or negative)

rotation

a number specifying rotation of the strip labels; used only in rectangular tree display mode

outline_width

a number specifying draw a black outline around the text (width in pixels)

Examples

tree <- system.file("extdata",
                    "tree_of_itol_templates.tree",
                    package = "itol.toolkit")
data("template_groups")
df_group <- data.frame(id = unique(template_groups$group),
                       data = unique(template_groups$group))
## create unit
unit <- create_unit(data = df_group,
                    key = "Quickstart",
                    type = "DATASET_COLORSTRIP",
                    tree = tree)
## write unit
file <- tempfile()
write_unit(unit,file)
## Learn parameter
lines <- line_clean(file=file)
sep = learn_separator(file = file)
learn_theme_strip_label(lines = lines, sep = sep)

[Package itol.toolkit version 1.1.7 Index]