Learn R Programming

glyrepr (version 0.10.1)

reduce_structure_level: Reduce a Glycan Structure to a Lower Resolution Level

Description

This function reduces a glycan structure from a higher resolution level to a lower resolution level (see get_structure_level() for four possible levels of resolution). For example, it can reduce an "intact" structure to a "topological" structure, or a "partial" structure to a "basic" structure. One exception is that you can never reduce an "intact" structure to "partial" level, because the "partial" level is not deterministic.

Usage

reduce_structure_level(x, to_level)

Value

A glycan_structure() vector reduced to the given resolution level.

Arguments

x

A glycan_structure() vector.

to_level

The resolution level to reduce to. Can be "basic" or "topological". Must be a lower resolution level than any structure in x ("intact" > "partial" > "topological" > "basic"). If to_level is the same as some structure in x, the result will be the same as the input. You can use get_structure_level() to check the structure levels of x.

Details

The logic is as follows:

  • If to_level is "topological", this function calls remove_linkages() to remove all linkages.

  • If to_level is "basic", this function calls remove_linkages() to remove all linkages, and convert_to_generic() to convert all monosaccharides to generic.

See Also

get_structure_level()

Examples

Run this code
glycan <- as_glycan_structure("Gal(b1-3)GalNAc(a1-")
reduce_structure_level(glycan, to_level = "topological")

Run the code above in your browser using DataLab