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
canonicalize
module 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'>)[source]¶
Parse a WURCS-encoded glycan structure from
text
into aGlycan
orGlycanComposition
.
- Parameters
text (str) – The WURCS string to parse
structure_class (
type
, optional) – The class to use to wrap theMonosaccharide
graph (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]¶