macでインフォマティクス

macでインフォマティクス

HTS (NGS) 関連のインフォマティクス情報についてまとめています。

メタゲノムリードの正確な分類を行う Centrifuger

 

 Centrifugerは、微生物ゲノムデータベースとシーケンスリードを比較する効率的な分類手法である。Centrifugerでは、Burrows-Wheeler変換されたゲノム配列は、ランブロック圧縮と呼ばれる新しいスキームを用いて可逆圧縮される。ランブロック圧縮は線形以下の空間複雑度を達成し、RefSeqのような多様な微生物データベースを圧縮するのに有効であると同時に、高速なランククエリをサポートする。この圧縮手法をFerragina-Manzini(FM)インデックスをコンパクト化する他の戦略と組み合わせることで、Centrifugerは他のFMインデックスベースのアプローチと比較してメモリフットプリントを半分に削減する。さらに、ロスレス圧縮と制約のないマッチ長により、Centrifugerは分類学的レベルの低い競合手法よりも高い精度を達成することができる。

 

 

インストール

ubuntu22でビルドした。

依存

  • Centrifuger depends on pthreads.

Github

https://github.com/mourisl/centrifuger
cd centrifuger/
make -j12
export PATH=${PWD}:$PATH

> ./centrifuger

./centrifuger [OPTIONS] > output.tsv:

Required:

    -x FILE: index prefix

    -1 FILE -2 FILE: paired-end read

    -u FILE: single-end read

    -i FILE: interleaved read file

Optional:

    -t INT: number of threads [1]

    -k INT: report upto <int> distinct, primary assignments for each read pair [1]

    --un STR: output unclassified reads to files with the prefix of <str>

    --cl STR: output classified reads to files with the prefix of <str>

    --barcode STR: path to the barcode file

    --UMI STR: path to the UMI file

    --read-format STR: format for read, barcode and UMI files, e.g. r1:0:-1,r2:0:-1,bc:0:15,um:16:-1 for paired-end files with barcode and UMI

    --min-hitlen INT: minimum length of partial hits [auto]

    --hitk-factor INT: resolve at most <int>*k entries for each hit [40; use 0 for no restriction]

    --merge-readpair: merge overlapped paired-end reads and trim adapters [no merge]

    --barcode-whitelist STR: path to the barcode whitelist file.

    --barcode-translate STR: path to the barcode translation file.

    -v: print the version information and quit

 

 

Pre-Build Database

レポジトリのリンク先からダウンロードできる。

 

r226をダウンロード後に解凍した(画像)。

 

あるいはダウンロードコマンドを使う。

centrifuger-download -o taxonomy taxonomy
centrifuger-download -o library -d "archaea,bacteria,viral" refseq > seqid2taxid.map

 

実行方法

1,DBとfastqを指定する。

#paired-ned
centrifuger -x cfr_gtdb_r226 -1 R1.fq.gz -2 R2.fq.gz -t 20 > classification.tsv

#single-end
centrifuger -x cfr_gtdb_r226 -u Reads.fq.gz -t 20 > classification.tsv
  • -x    index prefix
  • -1  -2    paired-end read
  • -u    ingle-end read
  • -i    interleaved read file
  • -t    number of threads [1] 

2GBx2のペアエンドfastq.gzの分類に5分弱程度かかった。

出力

 

2,定量(taxonomic profiling)にはcentrifuger-quantコマンドを使う。

centrifuger-quant -x cfr_gtdb_r226 -c classification.tsv > report.tsv

 

出力は8列からなる。

head report.tsv

最初の列は生のシーケンスリードのリードID

2列目はリードが分類されているゲノム配列の配列ID(例えば、MT019531.1)。

3列目は2列目のゲノム配列の分類学的ID(例:2697049)。

4列目は分類のスコアで、ヒットの加重和(例えば、4225)

5列目は次善の分類のスコア(例えば、0)。

6列目はCentrifugerで検出されたゲノム配列と一致するリードの塩基対の数(例えば、80)

7列目はリード長、またはペアの組み合わせの長さ(例えば、80)。

8列目はこのリードの分類数で、出力でいくつの割り当てが行われたかを示す(例:1)。

 

レポジトリより

  • centrifuger-quantの定量は最初のcentrifugerランの-kオプションの影響を受ける。k "を増やすとより具体的な分類結果が得られ、定量結果を改善できる可能性がある。
  • 10x Genomics のシングルエンドデータを実行するため、ワイルドカードにも対応している(まとめて定量される、レポジトリ参照)。
  • メモリはDBサイズと同じ程度必要(#39

引用

Centrifuger: lossless compression of microbial genomes for efficient and accurate metagenomic sequence classification

Li Song & Ben Langmead 

Genome Biology volume 25, Article number: 106 (2024) 

 

関連

*1

24スレッド、5995WX。r226のデータベース(160GB)はM.2 SSDから読み出し。