Package: phables
Phables: from fragmented assemblies to high-quality bacteriophage genomesPhables is a tool developed to resolve bacteriophage genomes using assembly graphs of viral metagenomic data. It models 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 theMinimum Flow Decomposition via Integer Linear Programmingimplementation to obtain the flow paths.For detailed instructions on installation and usage, please refer to thedocumentation hosted at Read the Docs.Phables is now available on bioconda athttps://anaconda.org/bioconda/phablesand on PyPI athttps://pypi.org/project/phables/. Feel free to pick your package manager, but we recommend that you useconda.NEW:Phables can now resolve bacteriophage genomes from long-read assemblies.Setting up PhablesOption 1: Installing Phables using conda (recommended)You can install Phables from bioconda athttps://anaconda.org/bioconda/phables. Make sure you havecondainstalled.# create conda environment and install phablescondacreate-nphables-cconda-forge-canaconda-cbiocondaphables# activate environmentcondaactivatephablesNow you can go toSetting up Gurobito configure Gurobi.Option 2: Installing Phables using pipYou can install Phables from PyPI athttps://pypi.org/project/phables/. Make sure you havepipandmambainstalled.pipinstallphablesNow you can go toSetting up Gurobito configure Gurobi.Setting up GurobiThe MFD implementation uses the linear programming solverGurobi. Thephablesconda environment and pip setup does not include Gurobi. You have to install Gurobi using one of the following commands depending on your package manager.# condacondainstall-cgurobigurobi# pippipinstallgurobipyTo 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 athttps://www.gurobi.com/academia/academic-program-and-licenses/.Test the installationAfter setting up, run the following command to print out the Phables help message.phables--helpQuick Start GuidePhables is powered bySnaketoolwhich 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 oncephablesinstallRun on test dataphablestestRun on your own data# Run Phables using short read dataphablesrun--inputassembly_graph.gfa--readsfastq/--threads8# Run Phables using long read dataphablesrun--inputassembly_graph.gfa--readsfastq/--threads8--longreadsPlease refer to thedocumentation hosted at Read the Docsfor further information on how to run Phables.Issues and QuestionsIf you want to test (or break) Phables give it a try and report any issues and suggestions underPhables Issues.If you come across any questions, please have a look at thePhables FAQ page. If your question is not here, feel free to post it underPhables Issues.Contributing to PhablesAre you interested in contributing to the Phables project? If so, you can check out the contributing guidelines inCONTRIBUTING.md.AcknowledgementPhables uses theGurobiimplementation ofMFD-ILPand code snippets fromSTRONG,METAMVGL,GraphBin,MetaCoAGandHecatomb. Special thanks are owed toRyan Wickfor developingBandageto visualise assembly graphs, which I heavily rely upon to investigate, develop and optimise my methods. The Phables logo was designed byAmber Skye.CitationPhables is published inBioinformaticsat DOI:10.1093/bioinformatics/btad586.If you use Phables in your work, please cite Phables as,Vijini Mallawaarachchi, Michael J Roach, Przemyslaw Decewicz, Bhavya Papudeshi, Sarah K Giles, Susanna R Grigson, George Bouras, Ryan D Hesse, Laura K Inglis, Abbey L K Hutton, Elizabeth A Dinsdale, Robert A Edwards, Phables: from fragmented assemblies to high-quality bacteriophage genomes, Bioinformatics, Volume 39, Issue 10, October 2023, btad586,https://doi.org/10.1093/bioinformatics/btad586@article{10.1093/bioinformatics/btad586,author={Mallawaarachchi, Vijini and Roach, Michael J and Decewicz, Przemyslaw and Papudeshi, Bhavya and Giles, Sarah K and Grigson, Susanna R and Bouras, George and Hesse, Ryan D and Inglis, Laura K and Hutton, Abbey L K and Dinsdale, Elizabeth A and Edwards, Robert A},title="{Phables: from fragmented assemblies to high-quality bacteriophage genomes}",journal={Bioinformatics},volume={39},number={10},pages={btad586},year={2023},month={09},abstract="{Microbial communities have a profound impact on both human health and various environments. Viruses infecting bacteria, known as bacteriophages or phages, play a key role in modulating bacterial communities within environments. High-quality phage genome sequences are essential for advancing our understanding of phage biology, enabling comparative genomics studies and developing phage-based diagnostic tools. Most available viral identification tools consider individual sequences to determine whether they are of viral origin. As a result of challenges in viral assembly, fragmentation of genomes can occur, and existing tools may recover incomplete genome fragments. Therefore, the identification and characterization of novel phage genomes remain a challenge, leading to the need of improved approaches for phage genome recovery.We introduce Phables, a new computational method to resolve phage genomes from fragmented viral metagenome assemblies. Phables identifies phage-like components in the assembly graph, models each component as a flow network, and uses graph algorithms and flow decomposition techniques to identify genomic paths. Experimental results of viral metagenomic samples obtained from different environments show that Phables recovers on average over 49\\% more high-quality phage genomes compared to existing viral identification tools. Furthermore, Phables can resolve variant phage genomes with over 99\\% average nucleotide identity, a distinction that existing tools are unable to make.Phables is available on GitHub at https://github.com/Vini2/phables.}",issn={1367-4811},doi={10.1093/bioinformatics/btad586},url={https://doi.org/10.1093/bioinformatics/btad586},eprint={https://academic.oup.com/bioinformatics/article-pdf/doi/10.1093/bioinformatics/btad586/51972145/btad586.pdf},}Also, please cite the following tools/databases used by Phables.Roach MJ, Pierce-Ward NT, Suchecki R, Mallawaarachchi V, Papudeshi B, et al. Ten simple rules and a template for creating workflows-as-applications. PLOS Computational Biology 18(12) (2022): e1010705.https://doi.org/10.1371/journal.pcbi.1010705Terzian P, Olo Ndela E, Galiez C, Lossouarn J, Pérez Bucio RE, Mom R, Toussaint A, Petit MA, Enault F. PHROG: families of prokaryotic virus proteins clustered using remote homology. NAR Genomics and Bioinformatics, Volume 3, Issue 3, lqab067 (2021).https://doi.org/10.1093/nargab/lqab067Steinegger M, Söding J. MMseqs2 enables sensitive protein sequence searching for the analysis of massive data sets. Nat Biotechnol 35, 1026–1028 (2017).https://doi.org/10.1038/nbt.3988Li H. Minimap2: pairwise alignment for nucleotide sequences. Bioinformatics, 34:3094-3100 (2018).https://doi.org/10.1093/bioinformatics/bty191Li H, Handsaker B, Wysoker A, Fennell T, Ruan J, Homer N, Marth G, Abecasis G, Durbin R, 1000 Genome Project Data Processing Subgroup. The Sequence Alignment/Map format and SAMtools, Bioinformatics, Volume 25, Issue 16, Pages 2078–2079 (2009).https://doi.org/10.1093/bioinformatics/btp352Woodcroft BJ, Newell R, CoverM: Read coverage calculator for metagenomics (2017).https://github.com/wwood/CoverMHagberg AA, Schult DA, and Swart PJ. Exploring network structure, dynamics, and function using NetworkX. In Proceedings of the 7th Python in Science Conference (SciPy2008), Gäel Varoquaux, Travis Vaught, and Jarrod Millman (Eds), (Pasadena, CA USA), pp. 11–15 (2008).Gurobi Optimization.https://www.gurobi.com/.