GlycoCT{XML}
A parser for GlycoCT{XML} format.
This module provides a simple parser for GlycoCT XML. It has fewer
features than glypy.io.glycoct, and does not support writing.
It is included for historical purposes.
High Level Functions
-
glypy.io.glycoct_xml.load(stream, structure_class=<class 'glypy.structure.glycan.Glycan'>, allow_multiple=True)[source]
Read all structures from the provided text stream.
- Parameters:
stream (file-like) – The text stream to parse structures from
structure_class (type, optional) – Glycan subclass to use
allow_multiple (bool, optional) – If False, makes loading multiple structures an error.
- Return type:
Glycan or list of Glycan
-
glypy.io.glycoct_xml.loads(text, allow_multiple=True)[source]
Read all structures from the provided text string.
- Parameters:
text (str) – The text to parse structures from
- Return type:
Glycan or list of Glycan
-
glypy.io.glycoct_xml.read(stream)[source]
A convenience wrapper for GlycoCTXML
- Parameters:
stream (file-like) – The text stream to parse structures from
- Return type:
GlycoCTXML
-
exception glypy.io.glycoct_xml.GlycoCTXMLError[source]
Implementation Details
-
class glypy.io.glycoct_xml.GlycoCTXML(stream, structure_class=<class 'glypy.structure.glycan.Glycan'>)[source]
Parse GlycoCT{XML} text data into Glycan objects.
The parser implements the Iterator interface, yielding successive glycans
from a text stream separated by empty lines.