| count_mono | R Documentation |
When mono is:
NULL (default), returns the total number of monosaccharides and substituents.
A string, returns the number of the specified monosaccharide or substituent.
count_mono(x, mono = NULL, include_subs = FALSE)
## S3 method for class 'glyrepr_composition'
count_mono(x, mono = NULL, include_subs = FALSE)
## S3 method for class 'glyrepr_structure'
count_mono(x, mono = NULL, include_subs = FALSE)
## S3 method for class 'igraph'
count_mono(x, mono = NULL, include_subs = FALSE)
x |
A glycan composition ( |
mono |
The monosaccharide or substituent to count. A character scalar.
If |
include_subs |
Whether to include substituents when |
When mono is "generic" (e.g. "Hex", "HexNAc"),
it counts all "concrete" monosaccharides that match.
For example, "Hex" will count all Glc, Man, Gal, etc.
When mono is "concrete" (e.g. "Gal", "GalNAc"),
NA is returned when the composition contains generic residues.
Floating substituents are counted like substituents attached to known
residues.
A numeric vector of the same length as x, or a numeric scalar for
graph input.
comp <- glycan_composition(c(Gal = 1, Man = 1, GalNAc = 1))
count_mono(comp, "Hex")
count_mono(comp, "Gal")
struct <- as_glycan_structure("Gal(b1-3)GlcNAc(b1-4)Glc(a1-")
count_mono(struct, "Gal")
# Total number of monosaccharides
count_mono(comp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.