macでインフォマティクス

macでインフォマティクス

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

分類学的シグナルを組み込むことでメタゲノムリードのアノテーションと分類学的プロファイリングを改善する RAT

 

 メタゲノム解析には、リードベースの分類学的プロファイリング、アセンブル、メタゲノムアセンブリゲノム(MAGs)のビニングが一般的である。ここでは、これらのステップを統合したRead Annotation Tool (RAT)を報告する。RATを使ってMAGやコンティグから得られる強固な分類学的シグナルを用いて、リードアノテーションを強化することに成功した。RATは高い精度と感度で分類学的プロファイルを再構築し、他の最先端ツールを凌駕している。多様性の高い地下水サンプルでは、RATはメタゲノミックリードの大部分をアノテーションし、適切な、時には高い分類学的ランクで新規分類群を呼び出すことができた。このように、RATによる統合プロファイリングは、マイクロバイオームの正確かつ包括的なビューを提供する。CAT/BAT/RATは https://github.com/MGXlab/CAT で入手できる。CAT packは、GTDBアノテーションもサポートするようになった。

 

配列の長さが長いと、複数の分類学的シグナルを統合できるため、先に述べたアノテーションのエラーが軽減される(アノテーションの信頼度:MAGs > contigs > reads)。しかし、長い配列の方が分類学アノテーションの精度が高いとはいえ、メタゲノミックデータの一部しか表現していないことが多く、マイクロバイオームの不完全な姿を示している(データの説明:リード>コンティグ>MAG)。de novoアセンブリやビニングはゲノム配列の十分なカバレッジに依存するため、MAGやコンティグを評価した場合、特に希少な微生物が見落とされることが予想される。

このパイプラインは、de novoアセンブルとビニングから得られたコンティグとMAGの正確なアノテーションと、残りの未アセンブルリードの直接的な相同性検索を統合している。RATは、可能な限り長い配列にリードを関連付け、最も信頼性の高い分類学的シグナル(MAGs > contigs > reads)に従って分類を割り当てることで、分類学的プロファイルを推定する。コンティグとMAGは、オープンリーディングフレーム(ORF)予測とタンパク質データベースとの比較に基づくロバストアノテーションを提供する、以前に発表されたツールCATとBATを用いて分類学的にアノテーションされる。RATは、MAG、コンティグ、リードからの分類学的シグナルを統合することで、他の最新ツールよりも正確なリードアノテーション分類学的プロファイルを提供し、多くの新規分類群を含む地下水マイクロバイオームを正確に特徴付けることを示す。

 

インストール

RAT は CAT v6.0 から CATパッケージに追加された。condaパッケージマネージャはまだサポートされていないので、依存関係を導入し(紹介)、CATレポジトリをクローンして使う。データベースは前もってビルドされたものがレポジトリのリンクからダウンロードできる。

Github

git clone https://github.com/MGXlab/CAT.git
cd CAT/CAT_PACK/
export PATH=$APTH:PWD

$ CAT reads -h

usage: CAT reads -c -t [options] [-h / --help]

 

Complete RAT workflow (perform read mapping, run CAT, BAT, and RAT):

Supply contigs, reads, database folder, taxonomy folder, and bin

folder.

 

Partial workflows:

If you have already mapped your reads, you can supply the sorted

mapping file and no read mapping will be performed.

If you have already run CAT and/or BAT, you can supply the output

files (contig2classification, bin2classification) and the path to the

taxonomy folder instead.

If you prefer not to use bin classification, do not supply the path to

a bin folder.

 

Run Read Annotation Tool (RAT).

 

Required arguments:

  -c , --contigs_fasta

                        Path to contigs fasta file.

  -t , --taxonomy_folder

                        Path to directory that contains taxonomy files.

  -m , --mode           classification mode. "mcr": integrate

annotations from MAGs, contigs, and reads; "cr": integrate annotations

from contigs and reads; "mr": integrate annotations from MAGs and

reads.

 

Optional arguments:

  -o , --out_prefix     Prefix for output files (default: ./out.RAT).

  -1 , --read_file1     Path to (forward) read file. Please note that

RAT does not currently support interlaced read files. Please supply a

single read file or two files for paired-end reads.

  -2 , --read_file2     Path to reverse read file.

  --bam1                Path to sorted mapping file.

  --bam2                Path to second sorted mapping file (not recommended).

  --alignment_unmapped

                        Path to alignment file of reads and contigs

that couldnot be classified by CAT/BAT.

  -b , --bin_fasta , --bin_folder

                        Path to bin fasta file or to directory containing bins.

  -s , --bin_suffix     Suffix of bins in bin directory (default: None).

  --c2c                 Path to contig2classification file.

  --b2c                 Path to bin2classification file.

  --read2classification

                        Includes read classification step.

  --u2c                 Path to bin2classification file.

  --mapping_quality     Minimum mapping quality phred score (default: 2)

  --path_to_bwa         Path to bwa binaries. Supply if RAT cannot find bwa.

  --path_to_samtools    Path to samtools binaries. Supply if RAT

cannot find samtools.

  --force               Force overwrite existing files.

  -q, --quiet           Suppress verbosity.

  --verbose             Increase verbosity.

  --no_log              Suppress log file.

  -h, --help            Show this help message and exit.

  -p , --proteins_fasta

                        Path to predicted proteins fasta file. If

supplied, the protein prediction step is skipped.

  -a , --diamond_alignment

                        Path to alignment table. If supplied, the

alignment step is skipped and classification is carried out directly.

A predicted proteins fasta file should also be supplied with argument

[-p / --proteins].

 

CAT/BAT-specific arguments:

  -d , --database_folder

                        Path to directory that contains database files.

  -r , --range          r parameter [0-100] (default: 10).

  -f , --fraction       f parameter [0-0.99] (default: 0.50).

  --path_to_prodigal    Path to Prodigal binaries. Supply if CAT/BAT

cannot find Prodigal

  --path_to_diamond     Path to DIAMOND binaries. Supply if CAT/BAT

cannot find DIAMOND.

  --no_stars            Suppress marking of suggestive taxonomic assignments.

  --I_know_what_Im_doing

                        Flag for experimental features.

 

DIAMOND specific optional arguments:

  -n , --nproc          Number of cores to deploy by DIAMOND (default: maximum).

  --sensitive           Run DIAMOND in sensitive mode (default: not enabled).

  --no_self_hits        Do not report identical self hits by DIAMOND

(default: not enabled).

  --block_size          DIAMOND block-size parameter (default: 12.0).

Lower numbers will decrease memory and temporary disk space usage.

  --index_chunks        DIAMOND index-chunks parameter (default: 1).

Set to 4 on low memory machines. The parameter has no effect on

temporary disk space usage.

  --tmpdir              Directory for temporary DIAMOND files

(default: directory to which output files are written).

  --compress            Compress DIAMOND alignment file (default: not enabled).

  --top                 DIAMOND top parameter [0-100] (default: 11).

Governs hits within range of best hit that are written to the

alignment file. This is not the [-r / --range] parameter! See

README.md.

 

> CAT -v #バージョンに注意

CAT pack v6.0 (12 December, 2023) by F. A. Bastiaan von Meijenfeldt,

Nikos Pappas, and Ernestina Hauptfeld.

 

 

実行方法

RATは、MAG、コンティグ、リードからの分類学的シグナルを統合することにより、メタゲノムの分類学的構成を推定する。

RATのランには、MAGs/bin、コンティグ、リードが必要。これらから統合プロファイルを作成する。どの要素を統合するかを指定するには、-mode 引数を使用する。指定できる文字は、m(MAGs)、c(contigs)、r(reads)となっていて、3文字の組み合わせはr単独を除いてすべて使用可能。さらにデータベース、taxonomyデータベースも指定する必要がある。

CAT reads --mode mcr -b bin_folder/ -c contigs.fasta --bam1 mapping_file_sorted.bam -1 forward_reads.fq.gz -2 reverse_reads.fq.gz -d db/ -t tax/
  • -m     classification mode. "mcr": integrate annotations from MAGs, contigs, and reads; "cr": integrate annotations from contigs and reads; "mr": integrate annotations from MAGs and reads. 

リードはシングルエンドとペアエンド両方サポートしている。RATはコンティグとMAGに対してCATとBATを実行し、リードをコンティグにマップし、マップされていないリードを個別にアノテーションする。すでにソートされたマッピングファイルを所有しているなら、提供することでマッピングステップをスキップできる(レポジトリより)。

 

RATの出力(レポジトリより)

  • ログファイル
  • コンティグfastaの全CAT出力ファイル
  • MAGの全BAT出力ファイル(DIAMONDアライメントとタンパク質Fastaを除く)
  • 各 MAG のアバンダンスを含むテーブル
  • 検出されたすべての分類群とそのサンプル中の存在量を含む表
  • 各リードの系統と、どのステップでアノテーションが行われたかを含むテーブル(-modeでrを指定しない場合はオプション)
  • コンティグfasta中の各コンティグの存在量を含むテーブル
  • CATでアノテーションできなかったすべてのマッピングされていないリードとコンティグの配列を含むfastaファイル
  • マッピングされていないリードとアノテーションされていないコンティグのダイアモンドアラインメント
  • マッピングされていないリードと(以前に)アノテーションされていないコンティグのアノテーションを含むテーブル

 

マッピング後に不明のエラーが出る。

引用

Integration of taxonomic signals from MAGs and contigs improves read annotation and taxonomic profiling of metagenomes

Ernestina Hauptfeld, Nikolaos Pappas, Sandra van Iwaarden, Basten L. Snoek, Andrea Aldas-Vargas, Bas E. Dutilh, F.A. Bastiaan von Meijenfeldt

bioRxiv, Posted March 24, 2023

 

関連