Package: phageai
PhageAIis an application that simultaneously representsa repository of knowledge of bacteriophagesand a bioinformatics pipeline to analyse genomes withArtificial Intelligence support. This package supports the most critical programmable features from our platform.Machine Learning algorithms can process enormous amounts of data in relatively short time in order to find connections and dependencies that are obvious for human beings. Correctly designed applications based on AI are able to vastly improve and speed up the work of the domain experts.Models based on DNA or proteins contextual vectorization and Deep Neural Networks are particularly effective when it comes to analysis of genomic data. The system that we propose aims to use the phages sequences uploaded to the database to build a model which is able to predict if a bacteriophage ischronic,temperateorvirulentwith a high probability. Furthermore, our system shares more prediction methods for phage taxonomy, phage similarity and annotation extended by proteins structural classes classification.One of the key system modules is the bacteriophages repository with a clean web interface that allows to browse, upload and share data with other users. The gathered knowledge about the bacteriophages is not only valuable on its own but also because of the ability to train the ever-improving Machine Learning models.Detection of virulent or temperate features is only one of the first tasks that can be solved with Artificial Intelligence. The combination of Biology, Natural Language Processing and Machine Learning allows us to create algorithms for genomic data processing that could eventually turn out to be effective in a wide range of problems with focus on classification and information extraced from DNA.Table of ContentsAvailable methods|Installation|Benchmark|Community and Contributions|Have a question?|Found a bug?|Team|Change log|License|CiteAvailable methodsupload(fasta_path, access)- upload FASTA file with phage genome as "public", "private" or "" (temporary) sample in the PhageAI repository. Upload stage is starting the bioinformatics pipeline execution for phage characteristic.processing_status(job_id)- get current processing status for your phage sample related with Job ID;get_lifecycle_classification(job_id)- get phage lifecycle classification result;get_taxonomy_classification(job_id)- get phage taxonomy classification results for order, family and genus;get_proteins_classification(job_id)- get phage proteins structural classes classification results;get_top10_similarities(job_id)- get TOP-10 similar phages to your sample from the repository;get_full_report(job_id)- get full phage characteristics report (all meta-data and predictions);get_phage_characteristic(accession_number)- get meta-data about publicly available phage with specific accession number (with version);Installation and usagePhageAI user account (1/3)Create a free user account inthe PhageAI web platformor use an existing one. If you had to create new one, activate your account by activation link which was sent on your mail inbox. After that, log into the platform successfully and click "My profile" in the top-right menu. In the "API access" section create a new access token (string) and copy it for the steps below.PhageAI package (2/3)PhageAIrequires Python 3.8.0+ to run and can be installed by running:pip install phageaiIf you can't wait for the latest hotness from the develop branch, then install it directly from the repository:pip install git+https://github.com/phageaisa/phageai.git@developPhageAI execution (3/3)PASTE_YOUR_ACCESS_TOKEN_HERE- PhageAI web user's access token;PASTE_YOUR_FASTA_PATH_HERE- FASTA filename with *.fasta or *.fa extension;Example - how to upload phage to repository with private accessfromphageai.platformimportPhageAIAccountsphageai_api=PhageAIAccounts(access_token='PASTE_YOUR_ACCESS_TOKEN_HERE')phage_example_jobid=phageai_api.upload(fasta_path="PASTE_YOUR_FASTA_PATH_HERE",access="private")Expected output should be the job ID value:{'job_id':'0a71e61a-ec58-447b-859e-d9ba15e103a9'}or, if you reach out daily API requests limit (100 by default), you can expect:{"author":["Your daily API limit (100 requests) has been exceeded"]}If you reach out your daily requests limit, and you still need more, feel free to contact us by contact@phageai.Example - how to track the processing progressTracking progress of phage processing is super useful if you upload more samples in the same time or when you integrate your service or pipeline with PhageAI.(...)phage_example_jobid=phageai_api.upload(fasta_path="PASTE_YOUR_FASTA_PATH_HERE",access="private")job_id=phage_example_jobid["job_id"]phageai_api.processing_status(job_id=job_id)Depends on what is the current stage of your sample processing ("Not Started", "In progress", "Done", "Failed"), expected output should be like:{'taxonomy_stage':'Done','proteins_stage':'Not Started','top10_stage':'Not Started','lifecycle_stage':'Done','final_report':'In Progress'}Each of the above stage is work separately in PhageAI so you can expect different statuses for each of them.Example - get lifecycle classification(...)phageai_api.get_lifecycle_classification(job_id=job_id)Expected output should be like:{'value':'Chronic','probability':99.85}In the same way you can execute otheravailable methodsfrom the package.BenchmarkPhageAI lifecycle classifier was benchmarked withDeePhage,bacphlip,VIBRANTandPHACTStools using 104 Virulent and Temperate bacteriophages from our paper (testing set). Correct predictions results:ToolVersionChronic supportPhage sequences used in researchTest set accuracy (%)DOIPhageAI0.4.1Yes15,23593.27This researchDeePhage1.0No1,64084.6210.1093/gigascience/giab056bacphlip0.9.6No1,05710010.7717/peerj.11396VIBRANT1.2.1No350,62685.5810.1186/s40168-020-00867-0PHACTS1.8No22775.0010.1093/bioinformatics/bts014Community and ContributionsHappy to see you willing to make the PhageAI better. Development on the latest stable version of Python 3+ is preferred. As of this writing it's 3.8. You can use any operating system.If you're fixing a bug or adding a new feature, add a test withpytestand check the code withBlackandmypy. Before adding any large feature, first open an issue for us to discuss the idea with the core devs and community.Have a question?Obviously if you have a private question or want to cooperate with us, you can always reach out to us directly by mail.Found a bug?Feel free to add a new issue with a respective title and description on thethe PhageAI repository. If you already found a solution to your problem, we would be happy to review your pull request.TeamCore Developers and Domain Experts who contributing to PhageAI:Piotr TyneckiŁukasz WałejkoKrzysztof OwsieniukJoanna KazimierczakArkadiusz GuzińskiBogumił ZimońŻaneta SzulcMaria UrbanowiczChange logThe log's will become rather long. It moved to its own file.SeeCHANGELOG.md.LicenseThe PhageAI package is released under the under terms ofthe MIT License.CitePhageAI - Bacteriophage Life Cycle Recognition with Machine Learning and Natural Language ProcessingTynecki, P.; Guziński, A.; Kazimierczak J.; Zimoń B.; Szulc Ż.; Jadczuk, M.; Dastych, J.; Onisko, A.Viruses, Special Issue "Bacteriophage Bioinformatics"
(ISSN 1999-4915), DOI:10.1101/2020.07.11.198606