5.1.2.1.4. cobramod.parsing.kegg

Data parsing for KEGG

This module handles the retrieval of data from KEGG into a local directory. The possible type of data that can be download:

  • Metabolite: Identifiers that start with the letter C, e.g C00001

  • Reactions: Identifiers that start with the letter R, e.g R00001. The

gene information for reactions is also included if the specie is specified - Module Pathways: Identifiers that start with the letter M, e.g M00001

Contact maintainers if other types should be added.

Important class of the module: - KeggParser: Child of the abstract class cobramod.parsing.base.BaseParser.

5.1.2.1.4.1. Module Contents

5.1.2.1.4.1.1. Classes

KeggParser

Helper class that provides a standard way to create an ABC using

5.1.2.1.4.1.2. Functions

get_graph(kegg_dict: dict) → dict

Returns dictionary with sequences for a graph, where the key the prior

retrieve_data(directory: pathlib.Path, identifier: str) → dict

Retrieves and stores the data of given identifier for the KEGG database.

cobramod.parsing.kegg.get_graph(kegg_dict: dict) dict

Returns dictionary with sequences for a graph, where the key the prior reaction is and the value, its successor; and a set with all participant reaction (vertex)

class cobramod.parsing.kegg.KeggParser

Bases: cobramod.parsing.base.BaseParser

Helper class that provides a standard way to create an ABC using inheritance.

cobramod.parsing.kegg.retrieve_data(directory: pathlib.Path, identifier: str) dict

Retrieves and stores the data of given identifier for the KEGG database.

Parameters
  • directory (Path) – Path for data storage.

  • identifier (str) – official name for given object in KEGG

Raises
Returns

dictionary from KEGG identifier with basic information

Return type

dict