Skip to main content

Phables: Phage bubbles resolve bacteriophage genomes in viral metagenomic samples

Project description

phables logo

Phables: Phage bubbles resolve bacteriophage genomes in viral metagenomic samples

CI GitHub Code style: black Anaconda-Server Badge PyPI version CodeQL Documentation Status

Phables is a tool developed to resolve bacteriophage genomes using phage bubbles in viral metagenomic data. It models cyclic phage-like components in the viral metagenomic assembly as flow networks, models as a minimum flow decomposition problem and resolves genomic paths corresponding to flow paths determined. Phables uses the Minimum Flow Decomposition via Integer Linear Programming implementation to obtain the flow paths.

For detailed instructions on installation and usage, please refer to the documentation hosted at Read the Docs.

NEW: Phables is now available on bioconda at https://anaconda.org/bioconda/phables and on PyPI at https://pypi.org/project/phables/. Feel free to pick your package manager, but we recommend that you use conda.

Setting up Phables

Option 1: Installing Phables using conda (recommended)

You can install Phables from bioconda at https://anaconda.org/bioconda/phables. Make sure you have conda installed.

# create conda environment and install phables
conda create -n phables -c conda-forge -c anaconda -c bioconda phables

# activate environment
conda activate phables

Now you can go to Setting up Gurobi to configure Gurobi.

Option 2: Installing Phables using pip

You can install Phables from PyPI at https://pypi.org/project/phables/. Make sure you have pip and mamba installed.

pip install phables

Now you can go to Setting up Gurobi to configure Gurobi.

Setting up Gurobi

The MFD implementation uses the linear programming solver Gurobi. The phables conda environment and pip setup does not include Gurobi. You have to install Gurobi using one of the following commands depending on your package manager.

# conda
conda install -c gurobi gurobi

# pip
pip install gurobipy

To handle large models without any model size limitations, once you have installed Gurobi, you have to activate the (academic) license and add the key using the following command. You only have to do this once.

grbgetkey <KEY>

You can refer to further instructions at https://www.gurobi.com/academia/academic-program-and-licenses/.

Test the installation

After setting up, run the following command to print out the Phables help message.

phables --help

Quick Start Guide

Phables is powered by Snaketool which packs in all the setup, testing, preprocessing and running steps into an easy-to-use pipeline.

Setup the databases

# Download and setup the databases - you only have to do this once
phables install

Run on test data

phables test

Run on your own data

# Preprocess data
# locally: using 8 threads (default is 1 thread)
phables preprocess --input assembly_graph.gfa --reads reads_dir/ --threads 8

# Run Phables
phables run --input assembly_graph.gfa 

Please refer to the documentation hosted at Read the Docs for further information on how to run Phables.

Issues and Questions

Phables is still under testing. If you want to test (or break) Phables give it a try and report any issues and suggestions under Phables Issues.

If you come across any questions, please have a look at the Phables FAQ page. If your question is not here, feel free to post it under Phables Issues.

Contributing to Phables

Are you interested in contributing to the Phables project? If so, you can check out the contributing guidelines in CONTRIBUTING.md.

Acknowledgement

Phables uses the Gurobi implementation of MFD-ILP and code snippets from STRONG, METAMVGL, GraphBin, MetaCoAG and Hecatomb.

Citation

The Phables manuscript is still under preparation. If you use Phables in your work, please contact Rob Edwards at raedwards@gmail.com for an appropriate citation.

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

phables-0.1.0.tar.gz (335.7 kB view hashes)

Uploaded Source

Supported by

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