
Draw a Symbol Nomenclature For Glycan (SNFG)
draw_cartoon.RdDraw a Symbol Nomenclature For Glycan (SNFG)
Arguments
- structure
A
glyrepr::glycan_structure()scalar, or a string of any glycan structure text nomenclatures supported byglyparse::auto_parse().- ...
Ignored.
- show_linkage
Show glycosidic linkage annotations or not. Default is TRUE. Substituent annotations are always shown.
- orient
The orientation of glycan structure. "H" for horizontal, "V" for vertical. Default is "H"
- fuc_orient
Fuc-like triangle orientation.
"flex"points non-reducing Fuc-like residues toward their rendered linkage direction, while"up"draws all Fuc-like triangles pointing upward. Reducing-end Fuc-like residues always point upward. Defaults to"flex".- red_end
Reducing-end annotation. The default
""keeps the current reducing-end line. Use"~"to add a wavy reducing end, or any other string to draw that string at the reducing end.- edge_linewidth
Numeric scalar controlling the linewidth of linkage lines. Defaults to the current value,
0.8.- node_linewidth
Numeric scalar controlling the linewidth of node borders. Defaults to the current value,
0.8.- node_size
Numeric scalar used as a multiplier for the default node size. Defaults to
1, which keeps the current size. Linkage annotations are moved farther from larger nodes, and are hidden with a warning whennode_sizeis too large to leave enough annotation space. Values larger than2are rejected because residues overlap.- colors
Optional named character vector of custom monosaccharide fill colors. Names must be supported monosaccharide names, such as
"Gal"or"GlcNAc". User-provided colors overwrite the default SNFG colors, while unprovided monosaccharides keep their default colors. Defaults toNULL.- highlight
An integer vector specifying the node indices to highlight. This argument is applicable only when
structureis aglyrepr::glycan_structure(). Note that for aglyrepr::glycan_structure(), the node indices correspond exactly to the monosaccharides in its printed IUPAC nomenclature. For example, givenglyrepr::as_glycan_structure("Gal(b1-3)[GlcNAc(b1-6)]GalNAc(a1-"), settinghighlight = c(1, 3)will highlight the "Gal" and "GalNAc" nodes.