Phynteny: Synteny-based prediction of bacteriophage genes
Project description
Phynteny-Transformer
Phynteny is annotation tool for bacteriophage genomes that integrates protein language models and gene synteny. Phynteny leverages a transformer architecture with attention mechanisms and long short term memory to capture the positional information of genes.
Phynteny takes a genbank file with PHROG annotations as input. If you haven't already annotated your phage(s) with Pharokka and phold go do that and then come right back here!
Dependencies
To run the Phynteny Transformer, you need the following dependencies:
- Python 3.9+
- torch
- numpy
- pandas
- click
- loguru
- BioPython
- transformers
- importlib_resources
- scikit-learn
- tqdm
You can install the dependencies using pip:
Installation
You can install Phynteny Transformer from source
git clone https://github.com/susiegriggo/Phynteny_transformer
cd Phynteny_transformer
pip install .
Pip and conda options coming soon
Install Models
Before you can run phynteny you'll need to install some databases
install_models
If you would like to install them to a specific location
install_models -o <path/to/database_dir>
If this doesn't work you can download the models directly from Zenodo and untar them yourself and point Phynteny to them with the -m flag.
Quick Start
phynteny_transformer test_data/test_phage.gbk -o test_output
Output
phynteny_transformer.gbkcontains a GenBank format file that has been updated to include annotations generated using Phynteny along with their Phynteny score and confidence.phynteny_per_cds_funcions.tsvprovides a table of the annotations generated (similar to thepharokka_cds_functions.tsv from Pharokka)
Brief Overview
Advanced Usage
Phynteny Transformer provides an advanced mode for specifying the parameters of a model that you trained yourself. To see all advanced options:
phynteny_transformer --help --advanced
Training Custom Models
Phynteny Transformer allows you to train your own custom models. To train a model, you need to provide a dataset in the required format and specify the training parameters. For more details, refer to the documentation in the train_transformer directory.
Bugs and Suggestions
If you break Phynteny or would like to make any suggestions please open an issue or email me at susie.grigson@gmail.com and I'll try to get back to you.
Wow! how can I cite this?
Preprint available at ...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file phynteny_transformer-0.1.2.tar.gz.
File metadata
- Download URL: phynteny_transformer-0.1.2.tar.gz
- Upload date:
- Size: 681.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89c1aaad4fc095f5f8b188e40b1a08077f20268ca53104642fa6bdf024293241
|
|
| MD5 |
e7f7743ec5fca2698c06a5d7c5d195e4
|
|
| BLAKE2b-256 |
313516ac12154be8f0f8234ef10e1b2ae98faf564eb85a2d11d8b48ae60970fd
|
Provenance
The following attestation bundles were made for phynteny_transformer-0.1.2.tar.gz:
Publisher:
python-publish.yml on susiegriggo/Phynteny_transformer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phynteny_transformer-0.1.2.tar.gz -
Subject digest:
89c1aaad4fc095f5f8b188e40b1a08077f20268ca53104642fa6bdf024293241 - Sigstore transparency entry: 229564299
- Sigstore integration time:
-
Permalink:
susiegriggo/Phynteny_transformer@f1a2c2ebb14aef3bf5da1a22a01cdce8a9160b7e -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/susiegriggo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f1a2c2ebb14aef3bf5da1a22a01cdce8a9160b7e -
Trigger Event:
release
-
Statement type:
File details
Details for the file phynteny_transformer-0.1.2-py3-none-any.whl.
File metadata
- Download URL: phynteny_transformer-0.1.2-py3-none-any.whl
- Upload date:
- Size: 671.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfe35e8a50d63ec8a42a9a72fb8745b30cf3c75ed80980d839d967a480ef2c56
|
|
| MD5 |
e6d9b610feec0824c703657318c2baa8
|
|
| BLAKE2b-256 |
e6a1327750acfc087a18fa97b0bd62218e79663f0cb285e140aaeb800574fc2f
|
Provenance
The following attestation bundles were made for phynteny_transformer-0.1.2-py3-none-any.whl:
Publisher:
python-publish.yml on susiegriggo/Phynteny_transformer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
phynteny_transformer-0.1.2-py3-none-any.whl -
Subject digest:
cfe35e8a50d63ec8a42a9a72fb8745b30cf3c75ed80980d839d967a480ef2c56 - Sigstore transparency entry: 229564307
- Sigstore integration time:
-
Permalink:
susiegriggo/Phynteny_transformer@f1a2c2ebb14aef3bf5da1a22a01cdce8a9160b7e -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/susiegriggo
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f1a2c2ebb14aef3bf5da1a22a01cdce8a9160b7e -
Trigger Event:
release
-
Statement type: