View source: R/parse-glycoct.R
| parse_glycoct | R Documentation |
This function parses GlycoCT strings into a glyrepr::glycan_structure().
GlycoCT is a format used by databases like GlyTouCan and GlyGen.
parse_glycoct(
x,
on_failure = "error",
progress = FALSE,
validate = lifecycle::deprecated()
)
x |
A character vector of GlycoCT strings. NA values are allowed and will be returned as NA structures. |
on_failure |
How to handle parsing failures. |
progress |
Whether to show a progress bar while parsing. |
validate |
Deprecated and ignored. Array records
are always validated by |
GlycoCT format consists of:
RES: Contains monosaccharides (lines starting with 'b:') and substituents (lines starting with 's:')
LIN: Contains linkage information between residues
UND: Contains floating substructures or substituents whose attachment to the main glycan is unresolved
Main reducing-end alditol residues retain their alditol status and use an unknown anomer configuration.
For more information about GlycoCT format, see the glycoct.md documentation.
A glyrepr::glycan_structure() object.
glycoct <- paste0(
"RES\n",
"1b:a-dgal-HEX-1:5\n",
"2s:n-acetyl\n",
"3b:b-dgal-HEX-1:5\n",
"LIN\n",
"1:1d(2+1)2n\n",
"2:1o(3+1)3d"
)
parse_glycoct(glycoct)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.