Skip to main content

Translation between BNGL models and Kappa models

Project description

Summary

TRuML is a Python application designed to translate models written in either Kappa or the BioNetGen language (BNGL) into the other language. Currently TRuML is only compatible with Python 2 and work is being done to adapt TRuML for use with Python 3. Documentation can be found on Read the Docs

Usage

TRuML is invoked on the command line using the command truml. All options can be seen with the -h or --help flags:

truml -h

Conversion of a model written in BNGL to the Kappa language is done using the command:

truml -b model.bngl

The corresponding Kappa model will then exist in the same directory as the source BNGL file. The reverse translation is done in an equivalent manner:

truml -k model.ka

Varying levels of verbosity can be achieved. TRuML uses Python’s logging library to track the translation process, and it’s default logging level is WARNING. The -v (--verbose) and -d (--debug) flags will set the logging level to INFO and DEBUG, respectively. The logging output can be redirected to a file with the -l (--log_file) flag and a corresponding file name.

Note that TRuML only translates the model structure. It does not consider any simulation or simulation perturbation directives from either language.

Caveats

The two languages are not interchangeable (there are models in both languages that cannot be exactly translated to the other). In many cases, TRuML will raise issues explicitly. However the languages are both still under development and unidentified incompatibilities could cause the translation process to crash. Some cases that cannot be exactly translated include:

BNGL to Kappa

  • Patterns containing molecules in complex but without explicit binding:

    A().B()
    

Kappa to BNGL

  • Models containing infinities ([inf])

Finally, the BioNetGen language is interpreted slightly differently for different simulation engines. The NFsim engine does not consider molecularity constraints on the right hand side of the rule. As this is similar to Kappa’s purely local pattern representation (which cannot consider right hand side molecularity), TRuML assumes this convention.

Project details


Download files

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

Source Distribution

TRuML-0.0.0.tar.gz (28.1 kB view hashes)

Uploaded source

Built Distribution

TRuML-0.0.0-py2-none-any.whl (29.3 kB view hashes)

Uploaded py2

Supported by

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