WURCS¶
Implements a reader and writer for the WURCS 2.0 format.
High Level Functions¶
- glypy.io.wurcs.dumps(glycan)[source]¶
Encode a saccharide object as a WURCS 2.0 string.
Note
The WURCS canonicalization has not been implemented yet, so the generated string may differ from other sources. However, the
canonicalizemodule can be used to standardize structures prior to encoding them.
- Parameters:
glycan (
Glycan,GlycanComposition, orMonosaccharide) – The structure to encode- Returns:
The structure encoded as a string.
- Return type:
- glypy.io.wurcs.loads(text, structure_class=<class 'glypy.structure.glycan.Glycan'>, _allow_composition: bool = True)[source]¶
Parse a WURCS-encoded glycan structure from
textinto aGlycanorGlycanComposition.
- Parameters:
text (str) – The WURCS string to parse
structure_class (
type, optional) – The class to use to wrap theMonosaccharidegraph (the default isGlycan)- Returns:
The parsed result
- Return type:
File Parser¶
Implementation Details¶
- class glypy.io.wurcs.CarbonDescriptors(descriptors, anomer, anomeric_position, ring_start, ring_end)[source]¶