Phables: Phage bubbles resolve bacteriophage genomes in viral metagenomic samples
Project description
Phables: Phage bubbles resolve bacteriophage genomes in viral metagenomic samples
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 Anaconda.org at https://anaconda.org/vijinim/phables and on PyPI at https://pypi.org/project/phables/. Feel free to pick your package manager.
Setting up Phables
Option 1: Installing Phables from Anaconda.org
You can install Phables from Anaconda.org at https://anaconda.org/vijinim/phables.
# add channels
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --add channels gurobi
# create conda environment and install phables
conda create -n phables -c vijinim phables
# activate environment
conda activate phables
Now you can go to Setting up Gurobi to configure Gurobi.
Option 2: Installing Phables from PyPi
You can install Phables from PyPI at https://pypi.org/project/phables/.
pip install phables
Now you can go to Setting up Gurobi to configure Gurobi.
Option 3: Downloading Phables from GitHub
You can clone the Phables repository to your machine.
git clone https://github.com/Vini2/phables.git
Now go into the phables
folder using the command
cd phables/
Using conda
We recommend that you use conda
. Once you have installed conda
, make sure you are in the phables
folder. Now run the following commands to create a conda
environment and activate it to run Phables.
conda env create -f environment.yml
conda activate phables
Using pip
If you prefer to use pip
instead of conda
, you can run the following command to install Phables using pip
. Make sure you are in the phables
folder.
pip install .
Setting up Gurobi
The MFD implementation uses the linear programming solver Gurobi. We chose Gurobi over open source solvers as Gurobi is fast and can solve large models (check the performance comparison at https://www.gurobi.com/resources/open-source-linear-and-mixed-integer-programming-software-and-solvers/).
The phables
conda environment and pip setup already include Gurobi. To handle large models without any model size limitations, you have to activate the (academic) license and add the key using the following command.
grbgetkey <KEY>
You can refer to further instructions at https://www.gurobi.com/academia/academic-program-and-licenses/. Please note that this academic lisence is a file-based host-locked license, meaning that you can only run Gurobi on the machine that the license was obtained for. If you want to run on a cluster, you will have to contact your system admin and setup a floating network license. You can find more details at https://support.gurobi.com/hc/en-us/articles/360013195412-How-do-I-obtain-a-free-academic-license-for-a-cluster-or-a-shared-computer-lab-.
Test the setup
After setting up, run the following command to ensure that Phables is working.
phables --help
Example usage
phables -g assembly_graph.gfa -p assembly_info.txt -hm edges.fasta.hmmout -ph phrog_annot.tsv -c coverage.tsv -b bam_files/ -o /output/path/
Please refer to the documentation hosted at Read the Docs for further information on how to obtain/format the inputs.
Snakemake Pipeline
To Do
Reporting Issues
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.
Acknowledgement
Phables uses the Gurobi implementation of MFD-ILP and code snippets from STRONG, METAMVGL, GraphBin and MetaCoAG.
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.