| glycan_composition | R Documentation |
Create a glycan composition from a list of named integer vectors. Compositions can contain both monosaccharides and substituents.
glycan_composition(...)
is_glycan_composition(x)
... |
Named integer vectors. Names are monosaccharides or substituents, values are numbers of residues. Monosaccharides and substituents can be mixed in the same composition. |
x |
A list of named integer vectors. |
Compositions can contain:
Monosaccharides: generic (e.g., "Hex", "HexNAc") or concrete (e.g., "Glc", "Gal"). Generic and concrete residues may be mixed.
Substituents: e.g., "Me", "Ac", "S". These can be mixed with either generic or concrete monosaccharides.
Components are automatically sorted with monosaccharides first (according to
their order in the monosaccharides table), followed by substituents (according
to their order in available_substituents()). Duplicate components are
automatically summed.
A glyrepr_composition object.
available_monosaccharides(), available_substituents()
# A vector with one composition (generic monosaccharides)
glycan_composition(c(Hex = 5, HexNAc = 2))
# A vector with multiple compositions
glycan_composition(c(Hex = 5, HexNAc = 2), c(Hex = 5, HexNAc = 4, dHex = 2))
# Residues are reordered automatically
glycan_composition(c(HexNAc = 1, Hex = 2))
# An example for generic monosaccharides
glycan_composition(c(Hex = 2, HexNAc = 1))
# An example for concrete monosaccharides
glycan_composition(c(Glc = 2, Gal = 1))
# Compositions with substituents
glycan_composition(c(Glc = 1, S = 1))
glycan_composition(c(Hex = 3, HexNAc = 2, Me = 1, Ac = 1))
# Substituents are sorted after monosaccharides
glycan_composition(c(S = 1, Gal = 1, Ac = 1, Glc = 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.