5.1.2.1.5. cobramod.parsing.plantcyc
¶
Data parsing for PlantCyc
This module handles the retrieval of data from PlantCyc into a local directory. The possible type of data that can be download:
Metabolites: Normally have an abbreviation or short name.
Reactions: Can have the words “RXN” in the identifier. Enzymes can sometimes
be used instead. The gene information for the reactions is include if found. - Pathways
Contact maintainers if other types should be added.
Important class of the module:
- PlantCycParser: Child of the abstract class
cobramod.parsing.base.BaseParser
.
5.1.2.1.5.1. Module Contents¶
5.1.2.1.5.1.1. Classes¶
Helper class that provides a standard way to create an ABC using |
5.1.2.1.5.1.2. Functions¶
|
Return a directed graph from given XML Element. A key represent the |
|
Searchs in given parent directory if data is located in their respective |
- cobramod.parsing.plantcyc.get_graph(root: Any) dict ¶
Return a directed graph from given XML Element. A key represent the parent reaction and the value is the child. A parent can have multiple children as tuples. End-reactions have a NoneType as child.
- Parameters
root (Element) – An XML element, which represent a XML file with the information of a pathway.
- Returns
Directed graph from root.
- Return type
Dict
- Raises
WrongParserError – If given root does not represent a pathway.
- class cobramod.parsing.plantcyc.PlantCycParser¶
Bases:
cobramod.parsing.base.BaseParser
Helper class that provides a standard way to create an ABC using inheritance.
- cobramod.parsing.plantcyc.retrieve_data(directory: pathlib.Path, identifier: str, database: str) xml.etree.ElementTree.Element ¶
Searchs in given parent directory if data is located in their respective database directory. If not, data will be retrieved from the corresponding database. Returns root of given identifier.
- Parameters
- Raises
Warning – If object is not available in given database
NotADirectoryError – If parent directory is not found
- Returns
root of XML file
- Return type
ET.Element