Learn R Programming

gglycan (version 0.0.3)

geom_glycan: Glycan Geometry Layer

Description

A convenient wrapper to add edges, edge labels, and SNFG nodes to a glycan plot.

Usage

geom_glycan(
  edge_color = "black",
  edge_width = 0.5,
  arrow_length = unit(2, "mm"),
  node_size = 5,
  node_label = FALSE,
  label_size = 3.88,
  edge_label_size = 3.88,
  ...
)

Value

A list of `ggplot2` layers.

Arguments

edge_color

Color of the edges.

edge_width

Width of the edges.

arrow_length

Length of the edge arrows.

node_size

Size of the node symbols.

node_label

Logical. Whether to show node labels (monosaccharide names). Default is FALSE.

label_size

Size of the node labels.

edge_label_size

Size of the edge labels (linkage).

...

Additional arguments (currently unused).

Examples

Run this code
s <- "Neu5Ac(a2-3)Gal(b1-4)GlcNAc(b1-2)Man(a1-3)Man(b1-4)GlcNAc(b1-4)GlcNAc"
if (FALSE) {
gglycan(s) + geom_glycan()
}

Run the code above in your browser using DataLab