This version of glydraw introduced some ggplot2
extensions.
glydraw_style() stores reusable glycan rendering
options for standalone cartoons, grobs, export, ggplot2 layers, guides,
and glycan scales. Explicit rendering arguments override the style.
(#55)geom_glycan() draws glycan cartoons for individual
observations in ggplot2 plots, with support for size, rotation,
justification, and cartoon appearance.geom_node_glycan() draws glycan cartoons as nodes
in ggraph network plots, with automatic node positioning and filtering
support. (#61)guide_glycan() displays glycan cartoons in ggplot2
legends.scale_x_glycan() and scale_y_glycan()
display glycan cartoons as discrete ggplot2 axis labels.hjust_red_end() and vjust_red_end()
anchor vertical and horizontal cartoons at their reducing ends in
geom_glycan(), scale_x_glycan(),
scale_y_glycan(), and guide_glycan().
guide_glycan() also gains hjust and
vjust parameters. Reducing-end justification is the default
for scale and guide cartoons along the axis perpendicular to their
drawing orientation; geom_glycan() remains centered by
default. (#54)draw_cartoon() now places double core Fuc branches on
opposite sides of the core GlcNAc when linkage positions are
unavailable, keeping both connections visible. (#59, #60)draw_cartoon() now treats generic dHex
residues as Fuc-like branches, using the same layout and
fuc_orient behavior as Fuc. (#56)export_cartoons() no longer supports
glyexp::experiment() input, and glyexp is no
longer a package dependency. (#33)arg = value instead. (#40)colors parameter to draw_cartoon()
and export_cartoons() for customizing monosaccharide fill
colors. (#44)fuc_orient parameter to
draw_cartoon() and export_cartoons() for
choosing whether Fuc triangles always point upward or flex toward their
linkage direction. (#42)scale parameter to save_cartoon()
and export_cartoons() for changing output pixel dimensions
while preserving cartoon appearance. (#35)node_size parameter to
draw_cartoon() and export_cartoons() for
scaling residue cartoon sizes. Values larger than 2 are
rejected because residues overlap. (#36)edge_linewidth and node_linewidth
parameters to draw_cartoon() and
export_cartoons() for customizing linkage line and node
border widths. (#34)red_end parameter to
draw_cartoon() and export_cartoons() for
custom reducing-end text or a wavy reducing-end annotation. (#31)draw_cartoon() for structures with two core Fuc
branches and one b1-4 GlcNAc branch, avoiding an igraph vertex-selection
error and keeping the b1-4 GlcNAc aligned with the core GlcNAc.
(#45)dpi for save_cartoon() and
export_cartoons() because glydraw uses an internal fixed
design scale. Supplying dpi now warns that the argument is
ignored. (#35)show_linkage = FALSE. (#41)orient = "V". (#43)ggview is no longer dependent. (#27)orient = "V". (#24)export_cartoons() create the output directory when
needed. (#17)export_cartoons() use vector names as output
filenames when available. (#17)mono_size parameter of
draw_cartoon(). (9b05e6c)highlight parameter to
draw_cartoon(). (7e57a54, 3745ec8, c1057ba)export_cartoons() to save multiple glycan structure
cartoons to files. (e1ac3c3)save_cartoon(). (fed89b9)border_px and path parameters
from save_cartoon().ggview instead of ggimage for
size fixing, which relies on rstudioapi::viewer() to
display the plot. You might feel some difference in the display effect,
but the SNFG itself keeps the same.draw_cartoon() is changed into
draw_cartoon(structure, mono_size = 0.2, show_linkage = TRUE, orient = "H", ...)
for better semantics.draw_cartoon() now prints fixed-size cartoon (sizes are
calculated based on glycan structures) to the plot panel, to provide a
unified behavior with save_cartoon().draw_cartoon().path parameter is mandatory in
save_cartoon(). Now it is optional, to be in line with
ggplot2::ggsave().save_cartoon() to differentiate
it with ggplot2::ggsave().