
Enhance glycan structure
enhance_struc.RdGiven a glycan structure of any resolution level (see glyrepr::get_structure_level() for details),
this function gives all possible glycan structures of higher resolution level.
Arguments
- strucs
A
glyrepr::glycan_structure()vector, or a character vector of glycan structure strings supported byglyparse::auto_parse(). Glycan structures with level higher or same asto_levelwill be returned as is. Glycan structures with level lower thanto_levelwill be enhanced to the level ofto_level.- to_level
The resolution level to enhance to. Can be "intact" or "topological". Default is "intact".
- db
A
glydb::glydb_structures()vector, or a character vector of glycan structure strings supported byglyparse::auto_parse(). All structures indbmust be at the same resolution level asto_level. If not provided, a default structure vector is loaded fromglydb::glydb_structures()with the specifiedto_level.
Value
A tibble with the following columns:
raw: The original glycan structures.enhanced: The enhanced glycan structures. Note that onerawglycan structure can have differentenhancedglycan structures as multiple rows in the result.
How to set db
The db parameter is very important for all functions in this package.
By default, it uses all available glycans in the glydb package,
which is usually larger than what you need.
You can use helper functions in glydb to narrow down the database,
e.g. glydb::glydb_compositions() or glydb::glydb_structures().
You can use the species and glycan_type parameters to focus on specific species and glycan type.
For example, if you are only interested in N-glycan compositions in human,
you can use glydb::glydb_compositions(species = "Homo sapiens", glycan_type = "N").
Also, you can decide the level of information in the database by setting mono_type
of glydb::glydb_compositions() and structure_level of glydb::glydb_structures().
You can then pass the result to the db parameter of this function.
For example,
Examples
# From topological level to intact level
enhance_struc("Gal(??-?)GalNAc(??-", to_level = "intact")
#> # A tibble: 9 × 2
#> raw enhanced
#> <struct> <struct>
#> 1 Gal(??-?)GalNAc(??- Gal(b1-3)GalNAc(a1-
#> 2 Gal(??-?)GalNAc(??- Gal(b1-3)GalNAc(b1-
#> 3 Gal(??-?)GalNAc(??- Gal(a1-3)GalNAc(b1-
#> 4 Gal(??-?)GalNAc(??- Gal(b1-4)GalNAc(b1-
#> 5 Gal(??-?)GalNAc(??- Gal(a1-6)GalNAc(a1-
#> 6 Gal(??-?)GalNAc(??- Gal(b1-6)GalNAc(a1-
#> 7 Gal(??-?)GalNAc(??- Gal(b1-6)GalNAc(b1-
#> 8 Gal(??-?)GalNAc(??- Gal(a1-3)GalNAc(a1-
#> 9 Gal(??-?)GalNAc(??- Gal(b1-4)GalNAc(a1-
# From basic level to topological level
enhance_struc("Hex(??-?)HexNAc(??-", to_level = "topological")
#> # A tibble: 4 × 2
#> raw enhanced
#> <struct> <struct>
#> 1 Hex(??-?)HexNAc(??- Gal(??-?)GalNAc(??-
#> 2 Hex(??-?)HexNAc(??- Gal(??-?)GlcNAc(??-
#> 3 Hex(??-?)HexNAc(??- Glc(??-?)GlcNAc(??-
#> 4 Hex(??-?)HexNAc(??- Man(??-?)GlcNAc(??-
# From partial level to intact level
enhance_struc("Gal(b1-?)GalNAc(a1-", to_level = "intact")
#> # A tibble: 3 × 2
#> raw enhanced
#> <struct> <struct>
#> 1 Gal(b1-?)GalNAc(a1- Gal(b1-3)GalNAc(a1-
#> 2 Gal(b1-?)GalNAc(a1- Gal(b1-6)GalNAc(a1-
#> 3 Gal(b1-?)GalNAc(a1- Gal(b1-4)GalNAc(a1-