macでインフォマティクス

macでインフォマティクス

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

膣内細菌叢の16S rRNA遺伝子の分類学的分類を配列ごとに迅速かつ正確に行う SpeciateIT

 

 大量の16S rRNA遺伝子配列を分類学的に分類するには、OTUへのクラスタリングやノイズ除去法が主流である。本著者らは、個々のアンプリコン配列を迅速かつ正確に分類する新しい分類学的分類ツールspeciateITを開発した(https://github.com/Ravel-Laboratory/speciateIT)。環境特異的な参照データベースは一般的に最適な分類学的割り当てをもたらす。この目的のために、膣内細菌叢からの16S rRNA遺伝子アンプリコン配列の分類学的分類のためのカスタム参照データベースであるvSpeciateDBも紹介する。speciateITは、他のアルゴリズムと比較して最小限の計算資源しか必要とせず、vSpeciateDBと組み合わせることで、環境特異的な方法で正確な種レベルの分類が可能であることを示す。

ここでは、新しく実用的に重要な 2 つのリソースについて説明する。新規の分類アルゴリズムであるspeciateITは、7次マルコフ連鎖モデルに基づいており、高速かつ正確な配列ごとの分類学的割り当てが可能である(107配列で最短10分)。その意義は、この環境特異的データベースの優位性にあり、普遍的なデータベースと比較して、より多くの種の解像度を提供する。

 

レポジトリより

SpeciateITは、高速で正確な個々の配列の分類学的分類が可能なアルゴリズムである。また、モデルvSpeciateDBは、膣内細菌叢を分類するためカスタム参照配列セットから構築されたモデルである。分類学的に調整されたアンプリコン特異的領域配列でトレーニングされた細菌種を表現するモデルガイドツリーと7次マルコフ連鎖モデルを使用することで、speciateITはわずかな計算リソースで、大規模な配列データセットを迅速に処理することができる。

インストール

Makefilemacosx用に設定されているのでmacでビルドした(Linuxマシン用にビルドする場合、CC、CXX、LINKをそれぞれgcc、g++、g++に変更する。また、LDFLAGSも変更する必要がある)。

git clone https://github.com/ravel-lab/speciateIT.git
cd speciateIT/
figshare(link)から3つのモデルをダウンロードし、vSpeciateDB_modelsに配置する
#それから
make all
export PATH="$PWD/bin/:$PATH"

> classify

$ classify

 

ERROR in ./classify.cc at line 285: Input fasta file is missing. Please specify it with the -i flag.

 

Given a fasta file of query sequences, a directory of MC model files and the reference tree

classify each sequence of the fasta file to a taxonomic rank corresponding to model

with the highest probability given that the | log( p(x | M_L) / p(x | M_R) | > thld (obsolete) 

 

 

USAGE 

 

 Using prebuilt MC models to classify sequences of an input fasta file

 

classify -d < MC models directory> -i <input fasta file> -o <output directory> [Options]

 

Options:

-d <mcDir>      - directory containing MC model files

-o <outDir>     - output directory for MC taxonomy files

-i <inFile>     - input fasta file with sequences for which -log10(prob(seq | model_i)) are to be computed

-r <model tree> - model tree with node labels corresponding to the names of the model files

-t <trgFile>    - file containing paths to training fasta files

-f <fullTx>     - fullTx file. Its optional parameter for printing classification output in a long format like in RDP classifier

-g <faDir>      - directory with reference fasta files

--rev-comp, -c          - reverse complement query sequences before computing classification posterior probabilities

--skip-err-thld         - classify all sequences to the species level

--pp-embedding          - for each internal node report pp's of all children on the given sequence.

                            Each internal node's table is written to a file <node name>_ref_lpps.txt (log posterior probabilities)

--max-num-amb-codes <n> - maximal acceptable number of ambiguity codes for a sequence

                          above this number sequence's log10prob() is not computed and

                          the sequence's id it appended to <genus>_more_than_<n>_amb_codes_reads.txt file.

                          Default value: 5

 

--pseudo-count-type, -p <f>  - f=0 for add 1 to all k-mer counts zero-offset

                              f=1 for add 1/4^k to k-mer counts zero-offset

                              f=2 the pseudocounts for a order k+1 model be alpha*probabilities from

                                  an order k model, recursively down to pseudocounts of alpha/num_letters

                                  for an order 0 model.

-q|--quiet           - suppers pregress messages

-v|--verbose         - verbose mode

-h|--help            - this message

 

Conditional probabitity tables are store in

<file_i>.MC<order>.log10cProb

 

 

Output file format:

 

seqId   model1        model2 ...

seq_1   log10prob11   log10prob12  ...

seq_2   log10prob21   log10prob22  ...

...

 

where log10prob_ij is log10 of the prob(seq_i | model_j)

 

 

Example: 

classify -d vaginal_v2_MCdir -f vaginal_v2.fullTx -i vaginal_v2.1.fa -o testDir

 

classify -d vaginal_v2_MCdir -r vaginal_v2_dir/model.tree -i vaginal_v2.1.fa -o testDir

 

classify -e 2BVBACT-97 -t vaginal_v2_dir/spp_paths.txt -k 8 -r vaginal_sppCondensed_v2i.tree -o testDir

 

 

 

テストラン

モデルと配列を指定する。

cd speciateIT/
classify -d vSpeciateDB_models/vSpeciateIT_V3V4 -i test.fasta -o MyProject

#force species-level annotations
classify -d vSpeciateDB_models/vSpeciateIT_V3V4 -i test.fasta -o MyProject --skip-err-thld
  • -d    directory containing MC model files
  • -o    output directory for MC taxonomy files
  • -i     input fasta file with sequences for which -log10(prob(seq | model_i)) are to be computed
  • --skip-err-thld    classify all sequences to the species level

膣内細菌叢の SpeciateIT モデルには、16S rRNA 遺伝子 V1-V3、V3-V4、および V4 領域配列のトレーニングセットが含まれている。

 

出力

> cat MyProject/MC_order7_results.txt 

 

  • training_data/のCatMap.txtファイルは各領域で提供され、対象となる可変領域でどの生物種が区別できないかを示す。

引用

SpeciateIT and vSpeciateDB: Novel, fast and accurate per sequence 16S rRNA gene taxonomic classification of vaginal microbiota

Johanna B. Holm, Pawel Gajer,  Jacques Ravel

bioRxiv, Posted April 22, 2024.