ロングリードデータのエラー訂正は、ゲノムアセンブリワークフローにおける重要な初期ステップである。倍数性が1を超える生物の場合、リード訂正時にハプロタイプ固有の変異を保持することが重要である。この課題は、複数のハプロタイプを意識した訂正手法の開発を促進してきた。しかし、既存の手法は、アドホックなヒューリスティックまたはディープラーニングアプローチのいずれかに基づいている。本論文では、この問題に対する厳密な定式化を提案する。当アプローチは、リファレンスベースのハプロタイプフェーシングで用いられる最小エラー訂正フレームワークを基盤としている。リファレンスゲノムを使用しないデノボコンテキストにおけるリードのエラー訂正の形式化がNP困難であることを証明する。大規模データセットへの適用を可能にするため、実践的なヒューリスティックを導入している。ヒトと植物のゲノムからのPacBio HiFiシーケンスデータセットを用いた実験では、本アプローチが最先端手法と同等の精度を達成することが示された。ソフトウェアはhttps://github.com/at-cg/HALEで無料で利用できる。
インストール
ymlレシピ通りの環境を作って導入した。
依存
- Linux OS (tested on RHEL 8 and Ubuntu 22.04)
- rustup (Install using rustup, the recommended way to get Rust)
- Python 3.1 or above (and conda) for data preprocessing
Make sure the following system packages are installed (Linux):
- build-essential, autoconf, libtool, pkg-config
git clone https://github.com/at-cg/HALE.git
cd HALE && RUSTFLAGS="-Ctarget-cpu=native" cargo build -q --release
# Create conda env
mamba env create --file scripts/hale-env.yml
conda activate hale
> ./target/release/hale -h
HALE is a haplotype-aware long read error correction tool which works best on HiFi reads and can be used to improve ONT Simplex (both long and ultralong reads)
Usage: hale <COMMAND>
Commands:
correct Subcommand used for error-correcting reads
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help
-V, --version Print version
> ./target/release/hale correct -h
Subcommand used for error-correcting reads
Usage: hale correct [OPTIONS] <READS> <OUTPUT>
Arguments:
<READS> Path to the fastq reads (can be gzipped)
<OUTPUT> Path to the corrected reads
Options:
--read-alns <READ_ALNS> Path to the folder containing *.oec.zst alignments
--write-alns <WRITE_ALNS> Path to the folder where *.oec.zst alignments will be saved
-w <WINDOW_SIZE> Size of the window used for target chunking (default 4096) [default: 4096]
-b <BATCH_SIZE> Batch size per core [default: 64]
-t <N_THREADS> number of threads [default: 128]
-c <CLUSTER> Path to a cluster of reads. [default: ]
-m <MODULE> m can be consensus, pih or hale [default: hale]
-h, --help Print help
> bash scripts/create_batched_alignments.sh
$ bash scripts/create_batched_alignments.sh
Please place batch.py in the same directory as this script.
This script requires 4 arguments:
1. The path to the preprocessed reads.
2. The path to the read ids of these reads e.g. from seqkit seq -n -i.
3. The number of threads to be used.
4. The directory to output the batches of alignments.
テストラン
1、HG002のchr19の限定的な領域10-12Mを読んだHiFiデータのダウンロードとリードIDの抽出。
mkdir -p test_run && cd test_run/
wget -O HG002.chr19_10M_12M.fastq.gz https://zenodo.org/records/14048797/files/HG002.chr19_10M_12M.fastq.gz?download=1
#リードIDを取得
seqkit seq -ni HG002.chr19_10M_12M.fastq.gz > HG002.chr19_10M_12M.read_ids
2、all-vs-allオーバーラップの計算。付属スクリプトを使用する。
../scripts/create_batched_alignments.sh HG002.chr19_10M_12M.fastq.gz HG002.chr19_10M_12M.read_ids 8 batch_alignments
出力例
batch_alignments/

3、hale correctのラン。fastqはgzip圧縮されていても認識する。
../target/release/hale correct --read-alns batch_alignments -t 12 HG002.chr19_10M_12M.fastq.gz HG002.chr19_10M_12M_corrected.fa
9900Xの12スレッド指定で5-10分かかった(windows11 WSL)。
出力例

(ハイライトされているのが出力)
引用
Haplotype-aware long-read error correction
Parvesh Barak, Daniel Gibney, Chirag Jain
bioRxiv, Posted June 26, 2025.
関連
- ロングリードのハプロタイプを考慮したエラー訂正を行う HERRO
- ナノポアのアダプタートリミングツール Porechop
-
Hi-CデータとロングリードDe Bruijnグラフの統合による効率的なテロメア間ゲノムアセンブリを行う Verkko2