
Enhance glycan structure
enhance_struc.RdGiven a glycan structure vector of any resolution level (see
glyrepr::get_structure_level() for details), this function gives compatible
structures with more specific residue identities or linkage information.
Usage
enhance_struc(
strucs,
db = lifecycle::deprecated(),
return_best = FALSE,
glycan_type = NULL,
species = NULL,
structure_level = "intact",
mono_type = "concrete",
mono_range = NULL
)Arguments
- strucs
A
glyrepr::glycan_structure()vector, or a character vector of glycan structure strings supported byglyparse::auto_parse(). Inputs with unresolved floating parts or substituents are excluded with a warning.- db
A
glydb::glydb_structures()vector, or a character vector of glycan structure strings supported byglyparse::auto_parse(). Structures with unresolved floating parts or substituents are excluded silently. Use the filtering arguments instead. This argument cannot be combined with them.- return_best
Logical. If
TRUE, only return the best matching structure (highest confidence) for each input structure. A customdbmust have aconfidenceattribute. Default isFALSE.- glycan_type
Glycan type to select from
glydb::glydb_structures().- species
Species to select, matched without regard to letter case.
- structure_level
Structure resolution,
"intact"(default) or"topological".- mono_type
Monosaccharide resolution,
"concrete"(default) or"generic".- mono_range
Named list of monosaccharide count ranges; see
glydb::glydb_structures().
Value
If return_best=TRUE:
An unnamed glyrepr::glycan_structure() vector with the same length as strucs.
Unmatched structures are returned as NA.
If return_best=FALSE:
A tibble with the following columns:
raw: The original glycan structures.enhanced: The enhanced glycan structures.confidence: The database confidence score for each enhanced structure, orNAwhen no score is available. Note that onerawglycan structure can have differentenhancedstructures as multiple rows in the result.
Details
Input and database vectors may mix generic, concrete, and mixed residues, as well as topological, partial, and intact structures. Each database candidate is matched against each input independently.
Examples
enhance_struc("Gal(??-?)GalNAc(??-", glycan_type = "O-GalNAc",
species = "Homo sapiens")
#> # A tibble: 3 × 3
#> raw enhanced confidence
#> <struct> <glydb_st> <dbl>
#> 1 Gal(??-?)GalNAc(??- Gal(b1-3)GalNAc(a1- 5.32
#> 2 Gal(??-?)GalNAc(??- Gal(b1-3)GalNAc(b1- 1.10
#> 3 Gal(??-?)GalNAc(??- Gal(a1-3)GalNAc(a1- 1.61