Skip to main content

Phynteny: Synteny-based prediction of bacteriophage genes

Project description

Phynteny-Transformer

Phynteny Transformer Logo

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.gbk contains 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.tsv provides a table of the annotations generated (similar to the pharokka_cds_functions.tsv from Pharokka)

Brief Overview

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

phynteny_transformer-0.1.2.tar.gz (681.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

phynteny_transformer-0.1.2-py3-none-any.whl (671.9 kB view details)

Uploaded Python 3

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

Hashes for phynteny_transformer-0.1.2.tar.gz
Algorithm Hash digest
SHA256 89c1aaad4fc095f5f8b188e40b1a08077f20268ca53104642fa6bdf024293241
MD5 e7f7743ec5fca2698c06a5d7c5d195e4
BLAKE2b-256 313516ac12154be8f0f8234ef10e1b2ae98faf564eb85a2d11d8b48ae60970fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for phynteny_transformer-0.1.2.tar.gz:

Publisher: python-publish.yml on susiegriggo/Phynteny_transformer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file phynteny_transformer-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for phynteny_transformer-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cfe35e8a50d63ec8a42a9a72fb8745b30cf3c75ed80980d839d967a480ef2c56
MD5 e6d9b610feec0824c703657318c2baa8
BLAKE2b-256 e6a1327750acfc087a18fa97b0bd62218e79663f0cb285e140aaeb800574fc2f

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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