← Back to all sparks
G

glyparse

ANALYTICS
Velocity0.0

Parsing Glycan Structure Text Representations

glyparse is quietly becoming the universal reader for glycan text notation.

glycomicsparsingfile formatsperformancer packages
Current state
glyparse converts the various text encodings of glycan structures into glyrepr objects. Version 0.7.0 was the widest release in the window, adding parsers for GlyCAM IUPAC, IUPAC-compact, KCF, and LINUCS and teaching auto_parse() to route them, alongside a long list of GlycoCT and WURCS edge cases. The rest of the window is error-handling and performance work: an on_failure switch, a 10-30x speedup on large inputs, and NA and name preservation.
Where it's heading
Two things are being built at once. Coverage keeps widening, both in the number of notations supported and in how much malformed or ambiguous real-world input each parser tolerates: alditol residues, unknown ring positions, ambiguous sialic acid descriptors, uppercase residue IDs. Meanwhile the package is hardening for batch use, with progress bars, vectorized speed, and a choice between erroring and returning NA on unparsable strings.
Prediction
With the major notations now covered, expect further releases to go to robustness on messy inputs and to keeping pace with glyrepr's structure representation rather than adding formats.

Recent moves

  1. 1mo ago

    Parser output uses glyrepr's public constructor

    Switching to glyrepr's public structure constructor fixes tidyverse joins failing on parsed structures under glyrepr 0.13.0. A one-line compatibility fix, but it unblocked a common downstream pattern.

    View source ↗
  2. 1mo ago

    Four new notations parsed and auto-detected

    GlyCAM IUPAC, IUPAC-compact, KCF, and LINUCS each get a parser, and auto_parse() detects and routes them, so callers no longer need to identify their encoding. The same release absorbs a batch of GlycoCT and WURCS edge cases and adds opt-in progress bars for large inputs.

    View source ↗
  3. 1mo ago

    WURCS and GlycoCT edge cases handled

    Ambiguous residues, unknown ring closures, N-sulfate substituent codes, and unknown reducing-end ring positions are handled correctly. Narrow fixes that only surface on real database exports.

    View source ↗
  4. 3mo ago

    on_failure lets parsers return NA instead of erroring

    An on_failure parameter on every parser chooses between erroring and returning NA for unparsable strings, defaulting to the old behavior. Small in surface, but it is what makes parsing a large vector of mixed-quality strings practical.

    View source ↗
  5. 5mo ago

    IUPAC parser accepts plain-text equivalents

    parse_iupac_extended() accepts alpha, beta, and -> spellings in place of their symbols. Input tolerance for structures that passed through systems that mangled Unicode.

    View source ↗
  6. 5mo ago

    Parsers get 10-30x faster on large inputs

    A 10-30x speedup across the parser functions for large inputs, plus removal of a deprecated dplyr call. Parsing is the first step of every glycoverse pipeline, so this is felt on every run.

    View source ↗