HERRO 使用教程

HERRO 使用教程

herro HERRO is a highly-accurate, haplotype-aware, deep-learning tool for error correction of Nanopore R10.4.1, Kit 14, Ultra-long (UL) reads. herro 项目地址: https://gitcode.com/gh_mirrors/he/herro

1. 项目介绍

HERRO(Haplotype-aware ERRor cOrrection)是一个高精度的, haplotype-aware 的深度学习工具,用于纠正 Nanopore R10.4.1 或 R9.4.1 的读数(建议读数长度至少为 10 kbps)。该工具能够有效地进行错误校正,提高组装质量。

2. 项目快速启动

安装环境

  • 操作系统:Linux(已在 RHEL 8.6 和 Ubuntu 22.04 上测试)
  • Zstandard
  • Python(及 conda)用于数据预处理
  • 从源代码编译:libtorch 2.0.*,rustup

克隆仓库

git clone https://github.com/dominikstanojevic/herro.git
cd herro

创建 conda 环境

conda env create --file scripts/herro-env.yml

编译 HERRO 二进制文件

下载 singularity 镜像:
wget -O herro.sif https://zenodo.org/records/13802680/files/herro.sif
构建 singularity 镜像(需要 sudo 权限):
sudo singularity build herro.sif herro-singularity.def
运行工具:

使用以下命令运行 HERRO 工具:

singularity run --nv --bind <host_path>:<dest_path> herro.sif inference <args>
从源代码编译:

确保已下载并安装 libtorch 和 rustup。

export LIBTORCH=<libtorch_path>
export LD_LIBRARY_PATH=$LIBTORCH/lib:$LD_LIBRARY_PATH
RUSTFLAGS="-Ctarget-cpu=native"
cargo build -q --release

编译完成后,二进制文件位于 target/release/herro

下载模型

对于 R10.4.1 数据:

wget -O model_R10_v0.1.pt https://zenodo.org/records/12683277/files/model_v0.1.pt

对于 R9.4.1 数据(实验性):

wget -O model_R9_v0.1.pt https://zenodo.org/records/12683277/files/model_R9_v0.1.pt

3. 应用案例和最佳实践

预处理读数

scripts/preprocess.sh <input_fastq> <output_prefix> <number_of_threads> <parts_to_split_job_into>

注意:Porechop 会将所有读数加载到内存中,因此可能需要将输入分成多个部分。如果不需要分割,将 <parts_to_split_job_into> 设置为 1。

minimap2 对齐和分批

scripts/create_batched_alignments.sh <output_from_reads_preprocessing> <read_ids> <num_of_threads> <directory_for_batches_of_alignments>

注意:读 id 可以使用 seqkit 获取:

seqkit seq -ni <reads> > <read_ids>

错误校正

herro inference --read-alns <directory_alignment_batches> -t <feat_gen_threads_per_device> -d <gpus> -m <model_path> -b <batch_size> <preprocessed_reads> <fasta_output>

注意:GPU ID 需要指定。例如,如果 -d 参数设置为 0,1,3,HERRO 将使用第一、第二和第四块 GPU 卡。参数 -t 是每个设备上的线程数,例如 -t 8 和使用 3 块 GPU,HERRO 将创建总共 24 个特征生成线程。

4. 典型生态项目

HERRO 可以与其他组装工具如 hifiasm 结合使用,以提高组装质量。具体案例可以参考项目官方文档中提供的 HG002 数据的组装结果和比较。

以上就是 HERRO 的使用教程,希望能够帮助您顺利地使用这个工具。

herro HERRO is a highly-accurate, haplotype-aware, deep-learning tool for error correction of Nanopore R10.4.1, Kit 14, Ultra-long (UL) reads. herro 项目地址: https://gitcode.com/gh_mirrors/he/herro

创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

尹辰子Wynne

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值