API for the alignment of multiple peptide sequences represented in the HELM notation. Input sequences can contain up to 256 non-natural amino acids.
-
Download and install MAFFT. Proceed to the MAFFT page. In the Download and Installation section choose your system and follow the installation instructions.
By default MAFFT is installed into the /usr/local/bin/ folder. The same path for MAFFT is specified in the local.env file. Please, edit this file if you installed MAFFT into other folder.
-
Create Python 3.8 virtual environment and activate it:
python3 -m venv ENV_NAME source ENV_NAME/bin/activate
-
Install dependencies specified in requirements.txt:
python3 -m pip install -r requirements.txt
-
Run the API using uvicorn HTTP server. Execute the following command through the terminal, while you are in the root directory:
uvicorn alignment.api:api --env-file local.env
-
Access the API through a web-browser. Copy the address specified on the last line of the terminal, after execution of the uvicorn command(by default it is http://127.0.0.1:8000), or you can use any API testing tool (e.g. Postman: https://www.postman.com/api-platform/)
Execute the following command to run all the tests:
python -m pytest -v
Execute the following command to run a specific test:
python -m pytest tests/unit_tests/*script_name* -v
For more information about MAFFT follow this link https://mafft.cbrc.jp/alignment/software/
For more information on FastAPI deployment you can refer to: https://fastapi.tiangolo.com/deployment/
For more information on uvicorn package you can refer to: https://www.uvicorn.org/