learn_field | R Documentation |
learn field paramters as list
learn_field(lines, sep)
lines |
a vector of character strings from template file. |
sep |
a character specifying the separator. |
a list of field parameters containing
labels |
a vector of characters specifying the filed name. In DATASET_HEATMAP, the labels are shown as heatamp column names. |
colors |
define colors for each individual field column (use hexadecimal, RGB or RGBA notation; if using RGB/RGBA, COMMA cannot be used as SEPARATOR) |
shapes |
Shape should be a number between 1 and 6, or any protein domain shape definition. 1-square, 2-circle, 3-star, 4-right pointing triangle, 5-left pointing triangle, 6-checkmark |
tree <- system.file("extdata",
"tree_of_itol_templates.tree",
package = "itol.toolkit")
df_frequence <- data.table::fread(system.file("extdata",
"templates_frequence.txt",
package = "itol.toolkit"))
## create unit
unit <- create_unit(data = df_frequence,
key = "Quickstart",
type = "DATASET_HEATMAP",
tree = tree)
## write unit
file <- tempfile()
write_unit(unit,file)
## Learn legend parameters
lines <- line_clean(file=file)
sep = learn_separator(file = file)
learn_field(lines = lines, sep = sep)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.