
Assign GlyTouCan accessions to glycan structures
struc_to_glytoucan.RdThis function takes a vector of glycan structures and returns the corresponding GlyTouCan accessions. Under the hood, it uses the GlycanFormatConverter API maintained by the Glycosmos project.
Arguments
- strucs
A
glyrepr::glycan_structure()vector, or a character vector of glycan text representations supported byglyparse::auto_parse(). The glycan structure must have "concrete" monosaccharides (e.g., Gal, GalNAc).
Value
A character vector of GlyTouCan accessions corresponding to the input glycan structures.
If a structure cannot be converted to a GlyTouCan accession, the corresponding entry will be NA.
Details
For "topological" structures (e.g., "Gal(??-?)GalNAc(??-"),
this function will first call fill_anomer_pos() to fill in the missing anomeric positions before querying the API.
This is necessary because all glycan structures in GlyTouCan must have defined anomeric positions.