Skip to contents

This function calls draw_cartoon() on each glycan structure in x, then calls save_cartoon() to save a figure for each of them. IUPAC-condensed nonmenclatures are used as file names.

Usage

export_cartoons(
  x,
  dirname,
  file_ext = "png",
  dpi = 300,
  show_linkage = TRUE,
  orient = c("H", "V")
)

Arguments

x

A glyexp::experiment(), a glyrepr::glycan_structure() vector, or a character vector of any glycan structure text nomenclatures supported by glyparse::auto_parse().

dirname

Directory name to save the cartoons.

file_ext

File extention supported by ggplot2::ggsave(). Defaults to "png".

dpi

Dots per inch. Defaults to 300.

show_linkage

Show linkage annotation or not. Default is TRUE.

orient

The orientation of glycan structure. "H" for horizontal, "V" for vertical. Default is "H"

Value

The function returns the list of cartoons implicitly.

Examples

if (FALSE) { # \dontrun{
library(glyexp)
export_cartoons(real_experiment, "path/to/save")
} # }