| convert_to_generic | R Documentation |
This function converts monosaccharide types of monosaccharide characters, glycan compositions, or glycan structures from concrete to generic type. This is a simplified version that only supports conversion from "concrete" to "generic" monosaccharides.
convert_to_generic(x)
## S3 method for class 'character'
convert_to_generic(x)
## S3 method for class 'glyrepr_structure'
convert_to_generic(x)
## S3 method for class 'igraph'
convert_to_generic(x)
## S3 method for class 'glyrepr_composition'
convert_to_generic(x)
x |
Either of these objects:
|
A new object of the same class as x
with monosaccharides converted to generic type. Graph input retains its
vertex IDs and order.
There are two types of monosaccharides:
concrete: e.g. "Gal", "GlcNAc", "Glc", "Fuc", etc.
generic: e.g. "Hex", "HexNAc", "HexA", "HexN", etc. Concrete furanose forms such as "Galf" and "GlcfNAc" convert to the same generic names as their ringless forms: "Hex" and "HexNAc", respectively. Explicit unusual configurations also convert to the same generic names as their natural counterparts. For example, "D-Fuc" and "D-Fucf" both convert to "dHex".
For the full list of monosaccharides, use available_monosaccharides().
# Convert character vectors
convert_to_generic(c("Gal", "GlcNAc", "Galf", "GlcfNAc"))
# Convert glycan compositions
comps <- glycan_composition(
c(Gal = 5, GlcNAc = 2),
c(Glc = 5, GalNAc = 4, Fuc = 1)
)
convert_to_generic(comps)
# Convert glycan structures
strucs <- c(n_glycan_core(), o_glycan_core_1())
convert_to_generic(strucs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.