https://github.com/midnighter/brenda-parser
Classes to parse the BRENDA database.
https://github.com/midnighter/brenda-parser
Last synced: 8 months ago
JSON representation
Classes to parse the BRENDA database.
- Host: GitHub
- URL: https://github.com/midnighter/brenda-parser
- Owner: Midnighter
- License: other
- Created: 2011-09-19T15:35:40.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2021-04-16T20:10:03.000Z (about 5 years ago)
- Last Synced: 2025-05-13T01:17:42.054Z (about 1 year ago)
- Language: Python
- Homepage:
- Size: 203 KB
- Stars: 12
- Watchers: 5
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.rst
Awesome Lists containing this project
README
=============
BRENDA Parser
=============
This Python module provides classes that encapsulate information provided by the
`BRENDA database`__ and a parser that generates relevant content from the text
file that can be downloaded for free.
.. __: http://www.brenda-enzymes.org/
Copyright
---------
:Author:
Moritz Emanuel Beber
:License:
Please see the LICENSE.rst file distributed with this module.
Recent Changes
--------------
* Parser no longer hick-ups on empty lines, continued lines not starting with a
tab, and other format breaking content.
* Parser now prints progress to stdout.
* Soon, support for the SOAP interface will be added.
* If desired, a setup script could be added.
Usage
-----
If you want to use this module outside its directory, you will have to add it to your
PYTHONPATH environment variable (unix).
.. code:: python
>>> from brenda import BRENDAParser
>>> with BRENDAParser("brenda_download.txt") as bp:
... content = bp.parse()
The method parse returns a dictionary with all enzymes that were parsed. Every
key in the dictionary is a string representing an EC number starting form the 6
general classes down to the individual enzymes. The values in the dictionary are
always lists, as an example:
.. code:: python
>>> len(content["1"])
1348
>>> len(content["1.1.1.1"])
1
Warning
-------
The API changed slightly.
Notes
-----
There is one additional key "file_encoding" which contains the argument used
for the parser when reading the file.