Skip to main content

RetroMol is retrosynthetic analysis tool for modular natural products

Project description

RetroMol logo

RetroMol

testing & quality PyPI PyPI - Python Version DOI

RetroMol is retrosynthetic parsing and fingerprinting tool for modular natural products.

RetroMol is designed to facilitate clustering modular natural products based on biosynthetic similarity, and to enable cross-modal retrieval between modular natural products and their coding biosynthetic gene clusters.

RetroMol powers the RetroMol webapp, available at here. The webapp can be used to query NPAtlas, MIBiG, and antiSMASH database entries for modular natural products based on biosynthetic similarity.

Installation

The most recent code and data can be installed directly from GitHub with:

pip install git+https://github.com/MolTools/RetroMol.git

The latest stable release can be installed from PyPI with:

pip install retromol

RetroMol has been developed for Linux and MacOS.

Getting started

The retromol command line tool is automatically installed alongside installation of the package. The command line tool can be used from the shell with the --help flag to show all subcommands:

python3 -m retromol --help

The RetroMol CLI has two modes, single and batch:

  • single: process a single compound at a time.
  • batch: process multiple compounds in a single command.

In either case a the output folder will contain a log file together with the results in either JSON or JSONL format. JSONL is standard output mode for batch mode to allow for easy parsing of large result sets. Batch mode also supports parallel processing.

Any column, field, or property in the input file, either CSV, TSV, SDF, or JSON, is preserved as props in the output JSON or JSONL.

Stereochemistry parsing is supported by supplying the -c flag.

Result JSONs or lines from a JSONL file can be loaded into Python using RetroMol's Result class for further downstream analyses.

Check out the examples folder for example scripts demonstrating how to use RetroMol as a library.

Using custom rules

RetroMol comes with a default set of retrosynthetic rules for modular natural products. See the default rules for examples of the included rules.

Attribution

License

The code in this package is licensed under the MIT License.

For Developers

The final section of the README is for if you want to get involved by making a code contribution.

Development installation

First fork the repository on GitHub, then clone your fork locally and install the package in "editable" mode with the development dependencies:

git clone git+https://github.com/MolTools/RetroMol.git
cd RetroMol
pip install -e .[dev]

You can now make code changes locally and have them immediately available for testing.

After testing your changes, you can commit and push them to your fork, and then open a pull request on the main repository explaining your changes.

Testing

After cloning the repository, the unit tests in the tests/ folder can be run reproducibly with:

pytest tests

Additionally, these tests are automatically re-run with each push and pull request on main in a GitHub Action.

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

retromol-2.1.0.tar.gz (92.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

retromol-2.1.0-py3-none-any.whl (63.1 kB view details)

Uploaded Python 3

File details

Details for the file retromol-2.1.0.tar.gz.

File metadata

  • Download URL: retromol-2.1.0.tar.gz
  • Upload date:
  • Size: 92.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for retromol-2.1.0.tar.gz
Algorithm Hash digest
SHA256 3f3afb487072da2c3bdf4b67a031fe686fef109617742b219e8d7560760d22d6
MD5 8e957fcc810f27a7a0d48bf8e3c39575
BLAKE2b-256 211081e67a3e09684ef2277521ae39b91c80e63eec9eaa312f653b1a546ab488

See more details on using hashes here.

Provenance

The following attestation bundles were made for retromol-2.1.0.tar.gz:

Publisher: release.yml on moltools/RetroMol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file retromol-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: retromol-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 63.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for retromol-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6cc5a488e67c665e0bdaefba0b4a22fdfe217e4815b8c01da13c7de625046140
MD5 e2dcdfcc98ba8cf64b54a285a1d33978
BLAKE2b-256 b71d37e424bf28b70b31dba80ad842ff0e9a50fc7f0a463a40bbae6dc2a1135f

See more details on using hashes here.

Provenance

The following attestation bundles were made for retromol-2.1.0-py3-none-any.whl:

Publisher: release.yml on moltools/RetroMol

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page