Skip to main content

mRNAid: experimentally validated open-source tool for optimization and visualisation of mRNA molecules

Project description

mRNAid: mRNA optimization tool

PyPI - Version

mRNAid is an experimentally validated open-source tool for optimization and visualisation of mRNA molecules. It features different optimization strategies based on user preferences.

mRNAid is available at: https://mrnaid.dichlab.org

More information about the tool and experiments performed for its evaluation is available in the following publication:

Nikita Vostrosablin, Shuhui Lim, Pooja Gopal, Kveta Brazdilova, Sushmita Parajuli, Xiaona Wei, Anna Gromek, Martin Spale, Anja Muzdalo, Constance Yeo, Joanna Wardyn, Petr Mejzlik, Brian Henry, Anthony W Partridge and Danny A. Bitton: mRNAid, an Open-Source Platform for Therapeutic mRNA Design and Optimization Strategies, 2022

bioRxiv link

You can find brief manual on how to use the tool here.

Command-line interface setup

Install mRNAid with pip:

pip install mRNAid

See help using:

mrnaid optimize --help

Example:

mrnaid optimize \
  --output example.json \
  --optimization-criterion codon_usage \
  --five-end ATG \
  --three-end CGG \
  --input-mRNA AGCAGAGAAGGCGGAAGCAGTGGCGTCCGCAGCTGGGGCTTGGCCTGCGGGCGGCCAGCGAAGGTGGCGAAGGCTCCCACTGGATCCAGAGTTTGCCGTCCAAGCAGCCTCGTCTCGGCGCGCAGTGTCTGTGTCCGTCCTCTACCAGCGCCTTGGCTGAGCGGAGTCGTGCGGTTGGTGGGGGAGCCCTGCCCTCCTGGTTCGGCCTCCCCGCGCACTAGAACGATCATGAACTTCTGAAGGGACCCAGCTTTCTTTGTGTGCTCCAAGTGATTTGCACAAATAATAATATATATATTTATTGAAGGAGAGAATCAGAGCAAGTGATAATCAAGTTACTATGAGTCTGCTAAACTGTGAAAACAGCTGTGGATCCAGCCAGTCTGAAAGTGACTGCTGTGTGGCCATGGCCAGCTCCTGTAGCGCTGTAACAAAAGATGATAGTGTGGGTGGAACTGCCAGCACGGGGAACCTCTCCAGCTCATTTATGGAGGAGATCCAGGGATATGATGTAGAGTTTGACCCACCCCTGGAAAGCAAGTATGAATGCCCCATCTGCTTGATGGCATTACGAGAAGCAGTGCAAACGCCATGCGGCCATAGGTTCTGCAAAGCCTGCATCATAAAATCAATAAGGGATGCAGGTCACAAATGTCCAGTTGACAATGAAATACTGCTGGAAAATCAACTATTTCCAGACAATTTTGCAAAACGTGAGATTCTTTCTCTGATGGTGAAATGTCCAAATGAAGGTTGTTTGCACAAGATGGAACTGAGACATCTTGAGGATCATCAAGCACATTGTGAGTTTGCTCTTATGGATTGTCCCCAATGCCAGCGTCCCTTCCAAAAATTCCATATTAATATTCACATTCTGAAGGATTGTCCAAGGAGACAGGTTTCTTGTGACAACTGTGCTGCATCAATGGCATTTGAAGATAAAGAGATCCATGACCAGAACTGTCCTTTGGCAAATGTCATCTGTGAATACTGCAATACTATACTCATCAGAGAACAGATGCCTAATCATTATGATCTAGACTGCCCTACAGCCCCAATTCCATGCACATTCAGTACTTTTGGTTGCCATGAAAAGATGCAGAGGAATCACTTGGCACGCCACCTACAAGAGAACACCCAGTCACACATGAGAATGTTGGCCCAGGCTGTTCATAGTTTGAGCGTTATACCCGACTCTGGGTATATCTCAGAGGTCCGGAATTTCCAGGAAACTATTCACCAGTTAGAGGGTCGCCTTGTAAGACAAGACCATCAAATCCGGGAGCTGACTGCTAAAATGGAAACTCAGAGTATGTATGTAAGTGAGCT 
# See all arguments using mrnaid optimize --help

The results will be stored in the output JSON file, see example here.

You can also invoke mRNAid directly from Python:

from mrnaid import optimize

optimize(
    input_mrna='AGCAGAGAAGGCGGAAGCAGTGGCGTCCGCAGCTGGGGCTTGGCCTGCGGGCGGCCAGCGAAGGTGGCGAAGGCTCCCACTGGATCCAGAGTTTGCCGTCCAAGCAGCCTCGTCTCGGCGCGCAGTGTCTGTGTCCGTCCTCTACCAGCGCCTTGGCTGAGCGGAGTCGTGCGGTTGGTGGGGGAGCCCTGCCCTCCTGGTTCGGCCTCCCCGCGCACTAGAACGATCATGAACTTCTGAAGGGACCCAGCTTTCTTTGTGTGCTCCAAGTGATTTGCACAAATAATAATATATATATTTATTGAAGGAGAGAATCAGAGCAAGTGATAATCAAGTTACTATGAGTCTGCTAAACTGTGAAAACAGCTGTGGATCCAGCCAGTCTGAAAGTGACTGCTGTGTGGCCATGGCCAGCTCCTGTAGCGCTGTAACAAAAGATGATAGTGTGGGTGGAACTGCCAGCACGGGGAACCTCTCCAGCTCATTTATGGAGGAGATCCAGGGATATGATGTAGAGTTTGACCCACCCCTGGAAAGCAAGTATGAATGCCCCATCTGCTTGATGGCATTACGAGAAGCAGTGCAAACGCCATGCGGCCATAGGTTCTGCAAAGCCTGCATCATAAAATCAATAAGGGATGCAGGTCACAAATGTCCAGTTGACAATGAAATACTGCTGGAAAATCAACTATTTCCAGACAATTTTGCAAAACGTGAGATTCTTTCTCTGATGGTGAAATGTCCAAATGAAGGTTGTTTGCACAAGATGGAACTGAGACATCTTGAGGATCATCAAGCACATTGTGAGTTTGCTCTTATGGATTGTCCCCAATGCCAGCGTCCCTTCCAAAAATTCCATATTAATATTCACATTCTGAAGGATTGTCCAAGGAGACAGGTTTCTTGTGACAACTGTGCTGCATCAATGGCATTTGAAGATAAAGAGATCCATGACCAGAACTGTCCTTTGGCAAATGTCATCTGTGAATACTGCAATACTATACTCATCAGAGAACAGATGCCTAATCATTATGATCTAGACTGCCCTACAGCCCCAATTCCATGCACATTCAGTACTTTTGGTTGCCATGAAAAGATGCAGAGGAATCACTTGGCACGCCACCTACAAGAGAACACCCAGTCACACATGAGAATGTTGGCCCAGGCTGTTCATAGTTTGAGCGTTATACCCGACTCTGGGTATATCTCAGAGGTCCGGAATTTCCAGGAAACTATTCACCAGTTAGAGGGTCGCCTTGTAAGACAAGACCATCAAATCCGGGAGCTGACTGCTAAAATGGAAACTCAGAGTATGTATGTAAGTGAGCT',
    five_end='ATG',
    three_end='CGG',
    optimization_criterion='codon_usage',
)

See mrnaid/cli/optimize.py for all available parameters.

See notebooks/01_mRNAid_example_usage.ipynb for usage and output format example.

Local web server setup

If you don't want to use public server you can install this tool locally on your machine.

1. Using docker-compose

The easiest way to run the tool locally is to use docker. You will have to install docker first and it should either contain docker-compose utility as a part of the distribution or you will need to install it separately.

Navigate to the project folder and execute:

docker-compose up --build

The tool will be available at http://localhost/

2. Without docker

To be able to run the tool without docker you will need to run frontend and backend separately.

Backend

You need Conda or one of the alternatives (Miniconda, Miniforge) being installed.

First, navigate to the ./mrnaid/backend/flask_app/ directory and execute following commands:

cd ./mrnaid/backend/flask_app/
  • Create a new virtual environment:
make env-create
  • Install redis database
make redis-install
  • In separate terminals execute following commands:

    1. Start redis server: make redis-run
    2. Start uwsgi server: make uwsgi-run
    3. Start celery: make celery-run
  • After these steps are executed, the job submission is available at the "optimize" API url: http://localhost/api/v1/optimize. Example of the json submitted to the "optimize" end point:

{
  "config": {
    "avoided_motifs": ["EcoRI", "UUU"],
    "codon_usage_frequency_threshold": 0.1,
	"max_GC_content": 0.9,
	"min_GC_content": 0.5,
	"GC_window_size": 100,
	"organism": "m_musculus",
	"entropy_window": 30,
  "number_of_sequences": 2
  },
  "dinucleotides": false, 
  "match_codon_pair": false,
  "uridine_depletion": true,
  "CAI": false,
  "precise_MFE_algorithm": true,
  "file_name": "test",
  "sequences": {
    "five_end_flanking_sequence": "UGAAUUCAGCAAUCU",
    "gene_of_interest": "AAUCAAAUAGGGUUAAGUCUAGGAUUGUUAGUCUGCUAAGGUCUGCAGUUACUGUGUCUACUGAUGAUAGUUCGCAUUGACAAU",
    "three_end_flanking_sequence": "GC"
  }
}
  • The job execution results are available at: http://localhost/api/v1/status/task-id, where task-id should be replaced with actual task id received after the request is submitted to the "optimize" API
Running the tests

To be able to execute tests for backend with pytest, you need to set up following environmental variables in the corresponding environment:

  • PYTHONPATH=..:../common:../flask_app
  • LOG_FILE=../flask_app/logs/logs.log
  • BACKEND_OBJECTIVES_DATA=../common/objectives/data

Tests can be found in backend/tests/ directory

Frontend

Install Node.js and Nginx web server.

  • Navigate to frontend directory
  • Build a package:
npm ci && npm run build
  • Remove default nginx configurations from nginx system directory
# location may vary based on your system and installation
rm /etc/nginx/conf.d/default.conf
  • Replace deleted configs with custom ones
# target location may vary based on your system and installation
cp ./config/nginx.conf /etc/nginx/conf.d/
  • Move build files to the corresponding nginx directory
cp -R ./build/* /usr/share/nginx/html
  • Restart nginx web server

Contributing

mRNAid is an open platform, please propose your changes and improvements. This can be done through the Issues tab.

License

Released under MIT License

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

mRNAid-1.0.0.tar.gz (329.5 kB view hashes)

Uploaded Source

Built Distribution

mRNAid-1.0.0-py3-none-any.whl (358.5 kB view hashes)

Uploaded Python 3

Supported by

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