https://github.com/nleroy917/optipyzer
Multi-Species Codon Optimization Engine
https://github.com/nleroy917/optipyzer
bioinformatics python react
Last synced: about 1 year ago
JSON representation
Multi-Species Codon Optimization Engine
- Host: GitHub
- URL: https://github.com/nleroy917/optipyzer
- Owner: nleroy917
- License: apache-2.0
- Created: 2020-04-01T01:23:41.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-11T00:27:43.000Z (over 2 years ago)
- Last Synced: 2025-04-11T12:24:26.907Z (about 1 year ago)
- Topics: bioinformatics, python, react
- Language: Python
- Homepage: https://optipyzer.com
- Size: 147 MB
- Stars: 27
- Watchers: 3
- Forks: 7
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A fast and flexible codon optimization tool. Optipyzer is capable of codon-optimizing both DNA and peptide sequences for multiple species at once while giving prefernce to certain species. The optimizer is hosted as a publically available web server with both a [web-interface](https://optipyzer.com) and a [python programming interface](https://pypi.org/project/optipyzer/) for one-off queries or more high-throughput frameworks. You can read more about the algorithm and the tool in our [preprint](https://doi.org/10.1101/2023.05.22.541759).
## Web Application
The web-interface can be found at [optipyzer.com](https://optipyzer.com). The site is intended to be used for simple, one-off queries. It provides a sequence input box and a species selection tool to choose your species and designate weightings. You can search through our database and specify any species you want.
## Python API
For convenience, we have also written a small python package for an easier to use interface in high-throughput workflows. The package is a basic wrapper around our server that exposes convenience functions to interface the optimization server and make calls for you.
## Install
```sh
pip install optipyzer
```
## Quick Start
To get started, simply create an `API` instance, and start making requests:
```python
import optipyzer
api = optipyzer.API()
dna_seq = "ATGGCCCTTTAA"
result = api.optimize(
seq=dna_seq,
seq_type="dna",
weights={"human": 2, "mouse": 1},
)
print(result['optimized_sd'])
```
For more detailed usage instructions and information about the algorithm, refer to the documentation [here](https://optipyzer.readthedocs.org)
## Local Optimization Server
Some users might be interested in optimizing sequences confidentially. That is, using a locally run server instead of making HTTP requests to the public API. This also increases speed. Because of this, a docker container was prepared to run a local instance of the server. The docker container will run the optimzation server off your local machine and you can now use this to optimize sequences instead of making calls to the public server.
_(i.e. The server now runs on localhost:8000)_
## To Run Locally:
```sh
docker build -t optipyzer .
docker run -p 8000:8000 optipyzer
```
## Using the local server
Simply specify you want to run the optimizer locally when initializing an Optipyzer object in your scripts and your local server will then be used:
```python
import optipyzer
api = optipyzer.API(local=True) # <--- specify you are using a local server
dna_seq = "ATGGCCCTTTAA"
result = api.optimize(
seq=dna_seq,
seq_type="dna",
weights={"human": 2, "mouse": 1},
)
print(result['optimized_sd'])
```
## Contributing
Issues, PR's, and contributions are always welcome. Please reach out (or open an issue) if you would like to contribute!