{"id":26572614,"url":"https://github.com/refresh-bio/phist","last_synced_at":"2026-04-04T14:42:54.796Z","repository":{"id":46173215,"uuid":"395106928","full_name":"refresh-bio/PHIST","owner":"refresh-bio","description":"Phage-Host Interaction Search Tool","archived":false,"fork":false,"pushed_at":"2024-07-08T14:49:09.000Z","size":12765,"stargazers_count":26,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-07-08T18:27:50.061Z","etag":null,"topics":["bacterial-genomes","bioinformatics","genomics","host-prediction","k-mers","phages"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/refresh-bio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-11T20:18:23.000Z","updated_at":"2024-07-08T14:12:14.000Z","dependencies_parsed_at":"2023-01-19T02:45:13.956Z","dependency_job_id":"e35c4111-9f39-4339-8fcb-c8207201d250","html_url":"https://github.com/refresh-bio/PHIST","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refresh-bio%2FPHIST","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refresh-bio%2FPHIST/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refresh-bio%2FPHIST/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/refresh-bio%2FPHIST/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/refresh-bio","download_url":"https://codeload.github.com/refresh-bio/PHIST/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245040215,"owners_count":20551297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bacterial-genomes","bioinformatics","genomics","host-prediction","k-mers","phages"],"created_at":"2025-03-23T00:34:34.477Z","updated_at":"2026-04-04T14:42:54.788Z","avatar_url":"https://github.com/refresh-bio.png","language":"C++","funding_links":[],"categories":["Host Prediction"],"sub_categories":["RNA Virus Identification"],"readme":"# PHIST\r\n[![Bioconda downloads](https://img.shields.io/conda/dn/bioconda/phist.svg?style=flag\u0026label=Bioconda%20downloads)](https://anaconda.org/bioconda/phist)\r\n[![C/C++ CI](https://github.com/refresh-bio/PHIST/workflows/C/C++%20CI/badge.svg)](https://github.com/refresh-bio/PHIST/actions)\r\n\r\n\r\n**Phage-Host Interaction Search Tool**\r\n\r\nA tool to predict prokaryotic hosts for phage (meta)genomic sequences. PHIST links viruses to hosts based on the number of *k*-mers shared between their sequences.\r\n\r\n\u003cp align=\"center\"\u003e\u003cimg src=\"phist_logo.png\" width=\"200\"\u003e\u003c/p\u003e\r\n\r\n## Quick start\r\n```bash\r\ngit clone --recurse-submodules https://github.com/refresh-bio/PHIST\r\n\r\ncd PHIST\r\nmake\r\n\r\n./phist.py ./example/virus ./example/host ./out/\r\n\r\n```\r\n\r\n## Installation\r\n\r\nPHIST uses [Kmer-db](https://github.com/refresh-bio/kmer-db) as a submodule, therefore a recursive repository clone must be performed:\r\n```\r\ngit clone --recurse-submodules https://github.com/refresh-bio/PHIST\r\n```\r\nUnder Linux/OS X the package can be built by running MAKE in the project directory (G++ 5.3 tested):\r\n```\r\ncd PHIST\r\nmake\r\n```\r\nUnder Windows one have to build Visual Studio 2015 solutions on *kmer-db* and *utils* subdirectories (use Release 64-bit configuration, as Python script depends on the default VS output directory structure).\r\n\r\n## Usage\r\n\r\nPHIST takes as input genomic sequences of viruses and candidate hosts in FASTA files (gzipped or not). Virus genomes may be provided in a single FASTA file or in a directory containing multiple FASTA files (one genome per file). Candidate host genomes should be stored individually in a directory (one genome per FASTA file) (see [example](./example/)).\r\n\r\n```\r\n./phist.py [options] \u003cvirus_path\u003e \u003chost_dir\u003e \u003cout_dir\u003e\r\n```\r\n\r\nPositional arguments:\r\n  * `virus_path`         Input FASTA file or directory with files (plain or gzip)\r\n  * `host_dir`          Input directory w/ host FASTA files (plain or gzip)\r\n  * `out_dir`           Output directory (will be created if it does not exist)\r\n\r\nOptions:\r\n* `-k \u003ckmer-length\u003e`   *k*-mer length (default: 25, max: 30)\r\n* `-t \u003cnum-threads\u003e`  Number of threads (default: number of cores)\r\n* `-h, --help`             Show this help message and exit\r\n* `--keep_temp`         Keep temporary kmer-db files [False]\r\n* `--version`              Show tool's version number and exit\r\n\r\n\r\n### Usage example\r\n\r\n```\r\n./phist.py example/virus/ example/host/ out/ \r\n```\r\n\r\n```\r\n./phist.py example/virus_multifasta.fna example/host/ out/\r\n```\r\n\r\n## Output format\r\n\r\nPHIST outputs two CSV files. One containing a table of common *k*-mers between phages and hosts, and second file with virus-host predictions.\r\n\r\n\r\n### Common *k*-mers table\r\n\r\nThe [common_kmers.csv](./example/common_kmers.csv) file stores numbers of common *k*-mers between phages (in columns) and hosts (in rows) in a sparse form. Specifically, zeros are omitted while non-zero *k*-mer counts are represented as pairs (*column_number* : *value*) with 1-based column indexing. Thus, rows may have different number of elements, e.g.:\r\n\r\n| \t\t\t\t\t\t\t\t\t| \t\t\t\t\t\t\t\t| \t\t\t\t\t| \t\t\t\t|\t\t|\t\t\t|\t\r\n| :---: \t\t\t\t\t\t\t| :---: \t\t\t\t\t\t| :---: \t\t\t| :---:\t\t\t| :---:\t|  :---:\t| \r\n| kmer-length: *k* fraction: *f* \t| phages \t\t\t\t\t| *\u0026phi;\u003csub\u003e1\u003c/sub\u003e*\t\t\t\t\t| *\u0026phi;\u003csub\u003e2\u003c/sub\u003e* | ... \t|  *\u0026phi;\u003csub\u003en\u003c/sub\u003e* |\r\n| hosts \t\t\t\t\t| total-kmers \t\t\t\t\t| \u0026#124;*\u0026phi;\u003csub\u003e1\u003c/sub\u003e*\u0026#124;\t\t| \u0026#124;*\u0026phi;\u003csub\u003e2\u003c/sub\u003e*\u0026#124; \t| ... \t|  \u0026#124;*\u0026phi;\u003csub\u003en\u003c/sub\u003e*\u0026#124; |\r\n| *h\u003csub\u003e1\u003c/sub\u003e* \t\t\t\t\t| \u0026#124;*h\u003csub\u003e1\u003c/sub\u003e*\u0026#124;\t| *i\u003csub\u003e11\u003c/sub\u003e* : \u0026#124;*h\u003csub\u003e1\u003c/sub\u003e \u0026cap; \u0026phi;\u003csub\u003ei\u003csub\u003e11\u003c/sub\u003e\u003c/sub\u003e*\u0026#124;\t| *i\u003csub\u003e12\u003c/sub\u003e* : \u0026#124;*h\u003csub\u003e1\u003c/sub\u003e \u0026cap; \u0026phi;\u003csub\u003ei\u003csub\u003e12\u003c/sub\u003e\u003c/sub\u003e*\u0026#124; | ||\r\n| *h\u003csub\u003e2\u003c/sub\u003e* \t\t\t\t\t| \u0026#124;*h\u003csub\u003e2\u003c/sub\u003e*\u0026#124;\t| *i\u003csub\u003e21\u003c/sub\u003e* : \u0026#124;*h\u003csub\u003e2\u003c/sub\u003e \u0026cap; \u0026phi;\u003csub\u003ei\u003csub\u003e21\u003c/sub\u003e\u003c/sub\u003e*\u0026#124;\t| *i\u003csub\u003e22\u003c/sub\u003e* : \u0026#124;*h\u003csub\u003e2\u003c/sub\u003e \u0026cap; \u0026phi;\u003csub\u003ei\u003csub\u003e22\u003c/sub\u003e\u003c/sub\u003e*\u0026#124; \t| *i\u003csub\u003e23\u003c/sub\u003e* : \u0026#124;*h\u003csub\u003e2\u003c/sub\u003e \u0026cap; \u0026phi;\u003csub\u003ei\u003csub\u003e23\u003c/sub\u003e\u003c/sub\u003e*\u0026#124;  \t| |   \r\n| *h\u003csub\u003e2\u003c/sub\u003e* \t\t\t\t\t| \u0026#124;*h\u003csub\u003e2\u003c/sub\u003e*\u0026#124;\t| ||||\r\n| ... \t\t\t\t\t\t\t\t| ...\t\t\t\t\t\t\t| ... ||||\r\n| *h\u003csub\u003em\u003c/sub\u003e* \t\t\t\t\t| \u0026#124;*h\u003csub\u003em\u003c/sub\u003e*\u0026#124;\t| *i\u003csub\u003em1\u003c/sub\u003e* : \u0026#124;*h\u003csub\u003em\u003c/sub\u003e \u0026cap; \u0026phi;\u003csub\u003ei\u003csub\u003em1\u003c/sub\u003e\u003c/sub\u003e*\u0026#124;\t| |||\r\n\r\nwhere:\r\n* *k* - k-mer length,\r\n* *\u0026phi;\u003csub\u003e1\u003c/sub\u003e*, *\u0026phi;\u003csub\u003e2\u003c/sub\u003e*,  ...,   *\u0026phi;\u003csub\u003en\u003c/sub\u003e* - phage names,\r\n* *h\u003csub\u003e1\u003c/sub\u003e*, *h\u003csub\u003e2\u003c/sub\u003e*,  ...,   *h\u003csub\u003em\u003c/sub\u003e* - host names,\r\n* \u0026#124;*a*\u0026#124; - number of k-mers in sample *a*,\r\n* \u0026#124;*a \u0026cap; b*\u0026#124; - number of k-mers common for samples *a* and *b*.\r\n\r\n\r\n### Host predictions\r\n\r\nThe [predictions.csv](./example/predictions.csv) file assigns each phage to its most likely host (i.e., the one having most *k*-mers in common). If there are multiple potential hosts with same number of common *k*-mers, all are reported. Each virus-host interaction is followed by *p*-value and adjusted *p*-value for multiple comparisons.\r\n\r\n| \tphage\t\t\t\t\t\t\t\t      | \t\thost\t\t\t\t\t\t| \tcommon *k*-mers\t\t\t\t| \t*p*-value\t\t\t|\tadj. *p*-value\t|\t\t\t\t\r\n| :---: \t\t\t\t\t\t\t       | :---: \t\t\t\t\t\t| :---: \t\t\t           | :---:\t\t\t     | :---:\t \t       | \r\n|  *\u0026phi;\u003csub\u003e1\u003c/sub\u003e*   | *host*( *\u0026phi;\u003csub\u003e1\u003c/sub\u003e*) | \u0026#124;*\u0026phi;\u003csub\u003e1\u003c/sub\u003e* \u0026cap; *host*(*\u0026phi;\u003csub\u003e1\u003c/sub\u003e*)\u0026#124; | ... | ... |\r\n|  *\u0026phi;\u003csub\u003e2\u003c/sub\u003e*   | *host*( *\u0026phi;\u003csub\u003e2\u003c/sub\u003e*) | \u0026#124;*\u0026phi;\u003csub\u003e2\u003c/sub\u003e* \u0026cap; *host*(*\u0026phi;\u003csub\u003e2\u003c/sub\u003e*)\u0026#124; | ... | ... |\r\n|  *\u0026phi;\u003csub\u003e3\u003c/sub\u003e*   | *host\u003csub\u003e1\u003c/sub\u003e*( *\u0026phi;\u003csub\u003e3\u003c/sub\u003e*) | \u0026#124;*\u0026phi;\u003csub\u003e3\u003c/sub\u003e* \u0026cap; *host\u003csub\u003e1\u003c/sub\u003e*(*\u0026phi;\u003csub\u003e3\u003c/sub\u003e*)\u0026#124; | ... | ... |\r\n|  *\u0026phi;\u003csub\u003e3\u003c/sub\u003e*   | *host\u003csub\u003e2\u003c/sub\u003e*( *\u0026phi;\u003csub\u003e3\u003c/sub\u003e*) | \u0026#124;*\u0026phi;\u003csub\u003e3\u003c/sub\u003e* \u0026cap; *host\u003csub\u003e2\u003c/sub\u003e*(*\u0026phi;\u003csub\u003e3\u003c/sub\u003e*)\u0026#124; | ... | ... |\r\n| ... | ... | ... | ... | ... | ... |\r\n\r\n\r\n## Further analysis\r\n\r\nThe `utils/matcher` tool retrieves the list of all exact matches of legnth \u003e= *k* for a given pair of phage and host FASTA sequences. The matches are provided with their coordinates in the viral and corresponding bacterial genome (a reversed interval in the latter indicates a reverse complement match).\r\n\r\n### Usage\r\n\r\n```\r\n./utils/matcher [options] \u003cvirus\u003e \u003chost\u003e \u003coutput\u003e\r\n```\r\n\r\nPositional arguments:\r\n  * `virus`             virus FASTA file (gzipped or not),\r\n  * `host`              host FASTA file (gzipped or not),\r\n  * `output`            output CSV file\r\n\r\nOptions:\r\n* `-k --k \u003ckmer-length\u003e`   *k*-mer length (default: 25, max: 30, may be different than the one used in the PHIST execution),\r\n\r\n\r\n### Example\r\n\r\n```\r\n./utils/matcher example/virus/NC_024123.fna example/host/NC_017548.fna shared_regions.csv\r\n```\r\n\r\n\r\n```\r\nexample/virus/NC_024123.fna,example/host/NC_017548.fna\r\nNC_024123.1:52942-52968,NC_017548.1:1456873-1456847\r\nNC_024123.1:52970-53009,NC_017548.1:1456845-1456806\r\nNC_024123.1:53011-53102,NC_017548.1:1456804-1456713\r\nNC_024123.1:53107-53147,NC_017548.1:1456708-1456668\r\nNC_024123.1:53830-53854,NC_017548.1:2647971-2647947\r\nNC_024123.1:54794-54827,NC_017548.1:679998-679965\r\n```\r\n\r\n\r\n## Citing\r\nZielezinski A, Deorowicz S, Gudyś A. PHIST: fast and accurate prediction of prokaryotic hosts from metagenomic viral sequences, Bioinformatics. 2022, 38(5):1447-9. doi:[10.1093/bioinformatics/btab837](https://doi.org/10.1093/bioinformatics/btab837).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefresh-bio%2Fphist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frefresh-bio%2Fphist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frefresh-bio%2Fphist/lists"}