learn_separator {itol.toolkit}R Documentation

Learn separator

Description

Learn 3 types of separators: tab, space, and comma.

Usage

learn_separator(lines = NULL, file = NULL)

Arguments

lines

a vector of character strings from template file. If the file parameter is NULL, this parameter should be set.

file

a character specifying the template file path. If this parameter is setted, the lines parameter will be replaced.

Value

a character specifying the separator

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 template type
learn_separator(file = file)

[Package itol.toolkit version 1.1.7 Index]