LZ-ANIは、大規模なゲノム配列セットの平均ヌクレオチド同一性(ANI)を決定するための、高速でメモリ効率のよいツールである。このツールはLempel-Ziv構文解析を使用し、一致するヌクレオチドと不一致のヌクレオチドを高感度で識別し、ANIの正確な決定を可能にする。LZ-ANIの効率性は、簡素化されたインデルの処理モデルに由来し、最も高感度なBLASTn検索に匹敵する精度を維持しながら、アライメントベースのツール(BLASTn、MegaBLASTなど)よりもはるかに高速である。
LZ-ANIは、ウイルスゲノムの比較およびクラスタリングツールであるVclustの主要コンポーネントになっている。ウイルスゲノム用に最適化されているが、LZ-AANIのパラメータは、バクテリアや古細菌のような長いゲノム用にカスタマイズすることができる。
インストール
リリースページからビルド済みバイナリをダウンロードできる。
ビルド依存
- C++17 compiler
- NASM ("sudo apt install nasm")
git clone --recurse-submodules https://github.com/refresh-bio/lz-ani
cd lz-ani && make -j
> ./lz-ani
$ ./lz-ani
lz-ani 1.2.0 (2024-10-09) by Sebastian Deorowicz, Adam Gudys
Tool for rapid determination of similarities among sets of DNA sequences
Usage:
lz-ani <mode> [options]
Modes:
all2all - all to all
Options - input specification:
--in-fasta <file_name> - FASTA file (for multisample-fasta mode)
--in-txt <file_name> - text file with FASTA file names
--in-dir <path> - directory with FASTA files
--multisample-fasta <bool> - multi sample FASTA input (default: true)
--flt-kmerdb <fn> <float> - filtering file (kmer-db output) and threshold
Options - output specification:
-o, --out <file_name> - output file name
--out-ids <file_name> - output file name for ids file (optional)
--out-alignment <file_name>- output file name for ids file (optional)
--out-in-percent <bool> - output in percent (default: false)
--out-type <type> - one of:
tsv - two tsv files with: results defined by --out-format and sequence ids (default)
single-txt - combined results in single txt file
--out-format <type> - comma-separated list of values:
query,reference,qidx,ridx,qlen,rlen,tani,gani,ani,qcov,rcov,len_ratio,nt_match,nt_mismatch,num_alns
you can include also meta-names:
complete=qidx,ridx,query,reference,tani,gani,ani,qcov,rcov,num_alns,len_ratio,qlen,rlen,nt_match,nt_mismatch
lite=qidx,ridx,tani,gani,ani,qcov,num_alns,len_ratio
standard=qidx,ridx,query,reference,tani,gani,ani,qcov,num_alns,len_ratio
(default: standard)
--out-filter <par> <float> - store only results with <par> (can be: tani, gani, ani, cov) at least <float>; can be used multiple times
Options - LZ-parsing-related:
-a, --mal <int> - min. anchor length (default: 11)
-s, --msl <int> - min. seed length (default: 7)
-r, --mrd <int> - max. dist. between approx. matches in reference (default: 40)
-q, --mqd <int> - max. dist. between approx. matches in query (default: 40)
-g, --reg <int> - min. considered region length (default: 35)
--aw <int> - approx. window length (default: 15)
--am <int> - max. no. of mismatches in approx. window (default: 7)
--ar <int> - min. length of run ending approx. extension (default: 3)
Options - other:
-t, --threads <int> - no of threads; 0 means auto-detect (default: 0)
-V, --verbose <int> - verbosity level (default: 1)
実行方法
LZ-ANIはデフォルトでANIの全対全比較を行うよう設計されている("lz-ani all2all")。したがって、入力配列のすべてのペアについて配列類似性が計算される。将来的にペアワイズ比較のモードも搭載する予定とレポジトリに書かれている。
比較したい(ウィルス)ゲノム配列全てを含むmulti-fastaファイルを指定する。
./lz-ani all2all --in-fasta example/multifasta.fna --out ani.tsv
- --in-fasta FASTA file (for multisample-fasta mode)
- --multisample-fasta multi sample FASTA input (default: true)
- --out output file name
テストデータでは0,1秒以内に計算が終了した。
> head ani.tsv

出力フォーマットはレポジトリで説明されている(link)。7つの配列類似性尺度で計算され、最終的にtatal ANI (tANI)が報告される。
もしくはゲノムのfastaファイルを含むディレクトリかfastaファイルのリストを指定する。fastaファイルはgzip圧縮されていても使用できる。
./lz-ani all2all --in-dir example/fna --out ani.tsv
out-filterオプションを使用すると出力をフィルタリングできる。Query coverage (aligned fraction) が0.85以上、ANI0.95以上。
./lz-ani all2all --in-fasta example/multifasta.fna --out ani.tsv --out-filter ani 0.95 --out-filter qcov 0.85
指定された基準を満たすゲノムペアのみ報告される。
論文より
- LZ-ANIパラメータは置換、欠失、挿入、逆位、重複、転座を含む模擬変異を含む10,000組のファージゲノムに対して最適化された。
引用
Ultrafast and accurate sequence alignment and clustering of viral genomes
Andrzej Zielezinski, Adam Gudyś, Jakub Barylski, Krzysztof Siminski, Piotr Rozwalak, Bas E. Dutilh, Sebastian Deorowicz
bioRxiv, Posted July 02, 2024.
関連