Merck / mRNAid

Other
13 stars 13 forks source link

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/
make env-create
make redis-install
{
  "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"
  }
}
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:

Tests can be found in backend/tests/ directory

Frontend

Install Node.js and Nginx web server.

npm ci && npm run build
# location may vary based on your system and installation
rm /etc/nginx/conf.d/default.conf

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