← Back to all sparks
G

glyrepr

ANALYTICS
Velocity2.5

Representation for Glycan Compositions and Structures

The type system the rest of the glycan stack is built on, being hardened one breaking change at a time.

glycomicsdata-structurestype-systemr-packagesvctrs
Current state
glyrepr defines the vector types for glycan structures and compositions that every sibling package operates on, with names, NA values, resolution levels from basic through intact, and mapping helpers over structure vectors. Structures now convert to and from node and edge tibbles, low-level constructors support name-preserving construction from trusted graphs, and as_glycan_structure() can degrade element-local failures to NA with one aggregated warning instead of failing the whole vector. The monosaccharide table has been normalised so every entry has a generic form, and substituent support keeps widening.
Where it's heading
This package sets the pace for the cohort, and its breaking changes show up as compatibility patches in glyanno, glyenzy and glymotif within days. The direction is toward behaving like a well-built vctrs type: 0.10.0 rewrote the internals to support names and NA properly, 0.11.0 made structure level a vector-wide scalar rather than a per-element value, and the recent releases keep making failure explicit rather than silent, with strict input checks and typed errors replacing quiet drops. Dependencies get shed as readily as features get added, with the parallel-mapping arguments and their furrr and future dependencies removed outright in 0.13.0.
Prediction
The graph-table conversions added in 0.13.0 and the name-preserving low-level constructors in 0.14.0 both look like foundations for other packages to build structures programmatically, so expect that surface to firm up next. Given the cadence of breaking changes, a 1.0 that freezes the type semantics is the more consequential thing to watch for.

Recent moves

  1. 26d ago

    Name-preserving construction from trusted graphs; partial-failure coercion

    The low-level constructor and validation APIs gain name-preserving construction from trusted glycan graphs, which is what a downstream package needs to build structures without going through string parsing. on_failure = 'na' lets a coercion keep its valid elements and report one aggregated warning rather than failing wholesale, continuing this package's pattern of making partial success representable.

    View source ↗
  2. 1mo ago

    Structures convert to and from graph tibbles; parallel mapping dropped

    structure_nodes(), structure_edges() and structure_from_tibbles() open the type to ordinary tidyverse manipulation, letting a user take a structure apart and rebuild it without touching internals. Removing the .parallel argument along with the furrr and future dependencies is the other half of the release and the more characteristic move: this package sheds surface as readily as it adds it. The renaming of get_anomer_pos() to infer_anomer_pos() is a naming honesty fix, with the old name kept as an alias.

    View source ↗
  3. 1mo ago

    Faster structure vector creation

    A performance optimisation for creating glycan structure vectors, with no API change. It matters mainly because everything in the cohort constructs these vectors constantly.

    View source ↗
  4. 3mo ago

    Anomeric position helpers for structures with missing detail

    get_anomer_pos() and fill_anomer_pos() address the routine case where measured structures lack anomeric detail, giving the cohort one place to handle it. glyanno later removes its own copy in favour of these, which is the boundary discipline this ecosystem keeps applying.

    View source ↗
  5. 3mo ago

    Structure level becomes a vector-wide scalar; sialic acid shorthand parsed

    get_structure_level() returning one scalar for a whole vector, computed from combined residue and linkage detail, is a semantic decision rather than a convenience: a vector now has a resolution, and mixed vectors resolve to their common level. Parsing E and L as NeuAc in composition strings accepts a widespread shorthand while warning that sialic acid linkage information is being dropped, which is the right trade to make loudly.

    View source ↗
  6. 6mo ago

    Replaces a deprecated dplyr call to silence warnings

    Swaps a deprecated dplyr function for its replacement to stop warnings reaching users. Pure upstream housekeeping.

    View source ↗