Other Line Formats

Glycomics is full of other notations for glycan sequences and compositions, with varying nomenclatures and syntx for everything. Below is a list of modules that parse at least the common cases for these formats.

Byonic Format

A simple dialect of Protein Metrics Byonic’s glycan composition notation.

glypy.io.byonic.dumps(composition)[source]

Encode GlycanComposition or Glycan into the Byonic glycan composition text format.

Parameters

composition (GlycanComposition or Glycan) – The structure to format

Return type

str

Raises

KeyError

glypy.io.byonic.loads(string)[source]

Parse a Byonic glycan composition into a FrozenGlycanComposition

Parameters

string (str) – The string to parse

Return type

FrozenGlycanComposition

Raises

KeyError

Glyconnect

A simple dialect of the Glyconnect/GlycoMod glycan composition notation.

glypy.io.glyconnect.dumps(composition)[source]

Encode GlycanComposition or Glycan into the GlyConnect glycan composition text format.

Parameters

composition (GlycanComposition or Glycan) – The structure to format

Return type

str

Raises

KeyError

glypy.io.glyconnect.loads(string)[source]

Parse a GlyConnect glycan composition into a FrozenGlycanComposition

Parameters

string (str) – The string to parse

Return type

FrozenGlycanComposition

Raises

KeyError

GWS Format

A parser for a subset of the GlycoWorkbench sequence format.

exception glypy.io.gws.GWSError[source]
glypy.io.gws.loads(text)[source]

Parse a single GWS glycan sequence plus metadata.

Parameters

text (str) – The sequence to parse

Returns

  • structure (Glycan) – The parsed glycan structure

  • metadata (tuple) – Unstructured metadata associated with the sequence.

CFG Format

An experimental parser for the Consortium for Functional Glycomics (CFG) glycan line format.

exception glypy.io.cfg.CFGError[source]
glypy.io.cfg.loads(text)[source]

Parse a single CFG glycan sequence.

Note

The spacer, if any, is ignored.

Parameters

text (str) – The sequence to parse

Returns

structure – The parsed glycan structure

Return type

Glycan