Hello,Hello小伙伴们大家好,好久没跟大家分享干货啦!近年来,随着宏病毒组学研究的快速发展,病毒与宿主的互作关系逐渐成为微生物生态学和环境基因组学领域的研究重点。如何在大规模的病毒序列中准确、高效地预测潜在宿主,是解析病毒生态功能和宿主特异性的重要环节。
iPHoP(Integrated Phage Host Prediction)是一款由美国德克萨斯大学奥斯汀分校 Ben Bolduc 等人开发的综合性病毒宿主预测软件。该工具宏基因组、病毒组及微生物组数据的宿主推断,尤其在环境与临床样本中表现出较强的适应性和实用性。其主要优势包括:
综上,iPHoP 为大规模病毒-宿主预测提供了一种高效且系统化的解决方案,对探索病毒生态学、噬菌体应用及病毒-宿主互作网络具有重要价值。
iPHoP 工作原理与预测流程
iPHoP(Integrated Phage Host Prediction)是一种集成多源信息、基于多策略融合的病毒宿主预测软件,旨在从宏基因组或病毒组数据中推断噬菌体及古菌病毒的宿主属级分类。该方法主要分为以下三个关键模块:
iPHoP 针对每条输入病毒序列,分别运行 6 种独立的宿主预测方法,包括:
对于基于宿主的方法(如 BLAST、CRISPR 等),iPHoP 在保留一定灵敏度的条件下提取命中列表,并计算所有命中宿主之间的系统发育距离(参考 GTDB 分类体系),形成一个命中评分矩阵。随后,iPHoP 采用一系列策略对这些命中进行聚类,并以候选宿主为中心,计算其与命中列表中其他物种的距离、支持数目和得分(如 Top 5 hit score、phylogenetic distance 等)。这些特征随后输入神经网络与随机森林分类器中,生成针对每一个候选宿主的置信得分,形成“taxonomy-aware”评分,强化预测的系统发育一致性。
iPHoP 对所有预测结果进行统一整合,策略如下:
下载网址:
https://bitbucket.org/srouxjgi/iphop/src/main/
# Bioconda安装(推荐方式)
# 创建专属环境避免依赖冲突
conda create -n iPHoP -c conda-forge -c bioconda iphop
# 激活环境
conda activaste iPHoP
# 验证安装是否成功
iphop --version
# Docker容器部署
# 获取官方镜像
docker pull quay.io/biocontainers/iphop:v1.2.0
# 验证安装是否成功
docker run -it quay.io/biocontainers/iphop:v1.2.0 iphop --help
下载网址:
https://portal.nersc.gov/cfs/m342/iphop/db/
默认下载数据库为当前最新版,当前最新版本为iPHoP_db_Jun25_rw,如下图所示;
数据库下载
# 软件推荐的下载命令
iphop download --db_dir iphop_db
# 这个数据库最新的版本有279G,根据小编的经验,使用iphop下载速度慢,而且容易中断,官方已经将数据集拆分成27个子集,类似于GTDB数据库,小伙伴们可以先用wget批量下载,经过md5校验后cat命令进行合并
for i in {00..27}
do
wget -c -nv -b -a download.log https://portal.nersc.gov/cfs/m342/iphop/db/iPHoP_db_Jun25_rw.tar.gz.${i}
done
cat iPHoP_db_Jun25_rw.tar.gz* > iPHoP_db_Jun25_rw.tar.gz
# 解压
mkdir -p iPHoP_db_Jun25_rw
tar -xvzf iPHoP_db_Jun25_rw.tar.gz -C iPHoP_db_Jun25_rw
# 检验数据库
cd iPHoP_db_Jun25_rw
md5sum -c md5checkfile.txt > md5checkfile.check
# 查看软件使用帮助
iphop -h
iPHoP v1.3.3: integrating Host Phage Predictions
https://bitbucket.org/srouxjgi/iphop
usage: iphop <task> [options]
task:
predict run full pipeline to generate host prediction for some input phage genome(s)
download download and setup the latest host database
add_to_db add some host genomes to the database of hosts (e.g. MAGs derived from the same metagenome(s))
other:
split small utility to split a fasta file into smaller batches (can be useful if you would like to split your input and run iPHoP separately for each batch)
clean small utility to clean the output directory of iPHoP by compressing some of the larger files.
optional arguments:
-h, --help show this help message and exit
子命令 | 功能概述 | 使用场景 |
---|---|---|
predict | 对输入的病毒序列进行宿主预测 | 标准分析流程 |
download | 下载官方标准宿主数据库 | 下载/更新数据库 |
add_to_db | 添加自定义宿主基因组(如 MAGs)至宿主数据库 | 定制分析特定环境样本 |
split | 拆分大型FASTA文件,便于并行运行 | 大批量输入 / 多线程分析 |
clean | 压缩中间文件,清理空间 | 批量运行完成后释放磁盘空间 |
# 病毒宿主预测
iphop predict -h
Run full pipeline to predict host of input bacteriophage/archaeal virus genomes
usage: iphop predict --fa_file <input genomes> --out_dir <output directory> [options]
optional arguments:
-h, --help show this help message and exit
--fa_file INPUT_FILE, -f INPUT_FILE
input fasta file of virus sequences
--out_dir OUT_DIR, -o OUT_DIR
output directory (default = ./)
--db_dir DB_PATH, -d DB_PATH
database directory (default = /home/Data/Jun25_2025_pub_rw/db)
--num_threads THREADS, -t THREADS
number of threads (default = 1)
--step STEP, -s STEP To run only specific step(s) (default: all, options: compute / classify)
--min_score MIN_SCORE, -m MIN_SCORE
Minimum confidence score for final output file - between 75 and 100. Default is 90, i.e. ~10% FDR (roughly). For ~5% overall (roughly) estimated FDR, use a minimum score of 95, etc.').
--no_qc Bypass the automated QC that filters out input sequences with > 10% Ns or with characters other than ATCGN. Warning: if set to true, low-quality sequences (with Ns or unusual characters) may lead to unexpected failures at multiple steps. (default = False)
--debug Run in a more verbose mode for debugging / troubleshooting purposes (warning: iPHoP becomes quite chatty in this mode..)
--single_thread_wish Force the recoded version of wish to run on a single thread instead of all the threads given to iPHoP (with --num_threads)
参数 | 功能描述与默认值 |
---|---|
--fa_file / -f | 输入病毒序列的 FASTA 文件(必填)。 |
--out_dir / -o | 输出目录,默认当前目录 ./。 |
--db_dir / -d | 宿主数据库目录,默认路径为 /home/Data/Jun25_2025_pub_rw/db,可通过 download 或 add_to_db 构建。 |
--num_threads / -t | 设置并行线程数,默认 1,建议根据硬件资源设置更高值以提升运行效率。 |
--step / -s | 控制执行步骤,默认运行全部流程(compute + classify),也可仅执行 compute 或 classify 用于调试。 |
--min_score / -m | 设置最小置信分数阈值,区间[70-95],默认 90(约 10% 假阳性率 FDR),设为 95 可提高预测精度(约 5% FDR)。 |
--no_qc | 跳过自动质控,默认关闭。启用后将保留 >10% N 或非标准字符序列,可能导致预测失败。 |
--debug | 启用调试模式,默认关闭。开启后输出详细日志,适用于排查运行错误。 |
--single_thread_wish | 强制 WIsH 子模块单线程运行,默认关闭,用于避免多线程冲突。 |
--help / -h | 显示命令帮助信息并退出程序。 |
# 自定义宿主库
iphop add_to_db -h
Add new genomes to the host database, for instance, new MAGs assembled from the same sample as the input phage/archaeovirus genomes
ote: the original database will not be duplicated but only linked to the updated one. If the path to the original database changes, the updated database will need to be rebuilt.
usage: iphop add_to_db --input_dir <directory with new host genomes> --gtdb_dir <output directory from GTDBtk (bacteria and archaea)> [options]
optional arguments:
-h, --help show this help message and exit
--fna_dir FNA_DIR, -f FNA_DIR
input fasta directory (one fasta file per genome)
--gtdb_dir GTDB_DIR, -g GTDB_DIR
GTDBtk result directory, with bacteria and/or archaea tree(s) including the new genomes to be added to the database
--out_dir OUT_DIR, -o OUT_DIR
output directory - will include the new database (default = ./new_db)
--num_threads THREADS, -t THREADS
number of threads (default = 1)
--db_dir DB_PATH, -d DB_PATH
absolute path to the original database directory - will be completed with new genomes (default = /mnt/sdb/share/database/Tools/iPHoP/Jun25_2025_pub_rw/db)
--debug Run in a more verbose mode for debugging / troubleshooting purposes (warning: iPHoP becomes quite chatty in this mode..)
参数 | 功能与默认说明 |
---|---|
--fna_dir / -f | 输入基因组的 FASTA 文件目录(每个基因组一个文件),通常为组装和binning得到的 MAGs。 |
--gtdb_dir / -g | 对应这些基因组的 GTDB-Tk 输出目录,应包含细菌和/或古菌的系统发育树结构文件(如bac120)。 |
--out_dir / -o | 输出目录,默认值为 ./new_db。将生成包含新宿主信息的数据库副本。 |
--num_threads / -t | 并行线程数,默认值为 1。建议根据系统资源设置为 8 或更高以提升速度。 |
--db_dir / -d | 原始宿主数据库的绝对路径,默认值为/home/Data/Jun25_2025_pub_rw/db。新添加的 MAGs 信息将在此基础上进行扩展(不会复制原始数据库,仅建立链接)。 |
--debug | 启用调试模式,默认关闭。开启后将输出详细调试日志,适用于故障排查。 |
--help / -h | 显示帮助信息并退出程序。 |
# 使用默认的数据库预测宿主
iphop predict --fa_file virus_assembly_genome.fna --out_dir iphop --db_dir iPHoP/Jun25_2025_pub_rw --num_threads 32 --min_score 90
# 添加binning好的MAGs当宿主(官方给的示例数据)
# GTDB构建系统发育信息(以细菌为例,这步很慢)
gtdbtk de_novo_wf --genome_dir Data_test_add_to_db_v1.4/Wetland_MAGs/ --bacteria --outgroup_taxon p__Patescibacteriota --out_dir Wetland_MAGs_GTDB-tk_results/ --cpus 32 --force --extension fa
# 将有注释信息和系统发育的信息添加到宿主数据库
iphop add_to_db --fna_dir Data_test_add_to_db_v1.4/Wetland_MAGs/ --gtdb_dir Wetland_MAGs_GTDB-tk_results/ --out_dir Jun_2025_pub_rw_w_Wetland_hosts --db_dir iPHoP/Jun_2025_pub_rw
# 使用新构建的数据库做预测
iphop predict --fa_file Input_viral_contigs.fasta --db_dir Jun_2025_pub_rw_w_Wetland_hosts/ --out_dir test_add_db -t 4 --min_score 75
1.结果目录
2.文件或目录含义
m90
表示采用最小置信度阈值 90(即 ~10% 假阳性率 FDR)。关于小编
小编就职于中国热带农业科学院,环境与植物保护研究所农业农村部热带地区低碳绿色农业重点实验室。目前实验室主要以研究方向是使用宏基因组学、宏病毒组等多组学研究微生物对土壤,大气等介质中元素循环的作用,环境中微生物功能基因的挖掘。有兴趣的老师欢迎扫描下方的二维码,添加小编的微信号和小编交流。