Skip to main content

Reaction Rules Parser

Project description


Anaconda-Server Badge Test Anaconda-Server Badge

Reaction Rules Parser. If no input reaction files is provided, retrieves the reaction rules from RetroRules.


  • rules-file: (string) Filename of reaction rules
  • input-format: (string) Valid options: csv, tsv. Format of the input file
  • rule-type: (string) Valid options: retro, forward, all. Return the rules that are in reverse, forward or both direction
  • outdir: (string) Path where output files will be written
  • diameters: (integer list) Valid options: 2, 4, 6, 8, 10, 12, 14, 16. The diameter of the rules to return
  • output-format: (string) Valid options: csv, tar.gz. Format of the returned file


  • output: (string): Path of the output file. Either a compressed tar.gz (containing a csv) or csv list of reaction rules that are in a RetroPath2.0 friendly format


From pip

[sudo] python -m pip install rrparser

From Conda

[sudo] conda install -c brsynth rrparser


Function call from Python code

from rrparser import Parser

outfile = Parser().parse_rules(rule_type, outdir, diameters)

If parameters from CLI have to be parsed, the function build_args_parser is available:

from rrparser import build_args_parser

parser = buildparser()
params = parser.parse_args()

Run from CLI

python -m rrparser.main \
  [--rules-file <filename>] \
  [--input-format {csv,tsv}] \
  [--rule-type {all,retro,forward}] \
  --output <folder> \
  [--diameters {2,4,6,8,10,12,14,16}] \
  --output-format {csv,tar.gz}


  • Thomas Duigou
  • Melchior du Lac
  • Joan Hérisson


This project is licensed under the MIT License - see the LICENSE file for details

How to cite RetroRules?

Please cite:

Duigou, Thomas, et al. "RetroRules: a database of reaction rules for engineering biology." Nucleic acids research 47.D1 (2019): D1229-D1235.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for rrparser, version 2.0.5
Filename, size File type Python version Upload date Hashes
Filename, size rrparser-2.0.5-py3-none-any.whl (6.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size rrparser-2.0.5.tar.gz (5.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page