macでインフォマティクス

macでインフォマティクス

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

メタゲノムアセンブリやVirSorterで同定されたウイルスコンティグのフルアノテーションを行う DRAM

 

 生物学的エンジンが触媒する特定の反応を解読することは、スケーラブルで代謝的に分解されたアノテーションソフトウェアがないために困難である。ここでは、微生物ベースの膨大なゲノム情報を微生物形質のカタログに変換するためのフレームワークである DRAM (Distilled and Refined Annotation of Metabolism) を紹介する。代謝学的に多様なゲノムを対象とした DRAM の適用性を実証するために、著者らは、定義されたin silico土壌コミュニティと、既に公開されているヒト腸内メタゲノムを対象に、DRAM の性能を評価した。その結果、DRAM が微生物の地球化学サイクルへの貢献度を正確に割り当て、腸内微生物の炭水化物代謝を基質レベルで自動的に分割することがわかった。DRAM のウイルスモードである DRAM-v は、ウイルスによってコードされた補助代謝遺伝子(AMG)を特定するためのルールを確立し、土壌や腸から数千もの推定 AMG代謝分類を実現した。DRAMDRAM-v を組み合わせることで、マイクロバイオームの機能を支えるメカニズムを解明するための重要な代謝プロファイリング機能を提供する。

 

wiki

https://github.com/WrightonLabCSU/DRAM/wiki

 

f:id:kazumaxneo:20220209234734p:plain

Pipeline Overview. マニュアルより転載。

 

マニュアルより

 DRAM (Distilled and Refined Annotation of Metabolism) は、メタゲノムでアセンブルされたゲノムやVirSorterで同定されたウイルスコンティグにアノテーションを行うためのツールです。DRAMは、7つのデータベース;KEGG(ユーザーが提供した場合)、UniRef90、PFAM、dbCAN、RefSeq viral、VOGDB、MEROPS peptidaseデータベース、およびユーザー独自のデータベースを使用してMAGおよびウイルスのコンティグにアノテーションを行います。DRAMは2つのステージで実行されます。まず、遺伝子にデータベース識別子を付与するアノテーションステップ、次に、これらのアノテーションを有用な機能カテゴリにキュレートするdistillステップです。ウイルスコンティグをさらに解析し、潜在的AMGを同定するステップもあります。これは、補助的なスコアと、遺伝子が代謝系とウイルス系の両方であることを示すフラグを割り当てることによって行われます。

 DRAMは、その名の通り、ウイスキーの製造過程のようにゲノムアノテーションを3段階の情報量に分類します。(1)原酒、(2)蒸留酒、(3)リキュールです。この蒸留プロセスにより、DRAMは大量の微生物ゲノムにアノテーションを施し、得られた情報を機能ギルドを強調する形で整理し、ユーザーが数百のゲノムから生物の代謝を推測することを可能にします。DRAMはRaw出力を得るために、入力ゲノム上の遺伝子を呼び出し、それぞれの遺伝子を7つのデータベースで検索し、導き出されたすべてのアノテーションを一緒に考慮します。この手法により、DFAST、MetaERG、Prokkaなどの他のアノテーターに比べて、データベース検索が25%以上大幅に増加します。DRAMのRaw出力には、各入力ゲノムにおける遺伝子ごとのすべてのデータベースヒットが含まれており、これは多くのアノテーターにとって最終的な出力となります。DRAMは、すべてのアノテーションを生態系に関連する機能として初めて整理・可視化することにより、最終的なRaw出力を超えてゲノムアノテーションを大きく前進させます。

 

インストール

依存

#conda (link)
wget https://raw.githubusercontent.com/shafferm/DRAM/master/environment.yaml
mamba env create -f environment.yaml -n DRAM
conda activate DRAM

#pip (pypi)
pip install DRAM-bio

> DRAM-setup.py -h

$ DRAM-setup.py -h

usage: DRAM-setup.py [-h] {version,prepare_databases,set_database_locations,update_description_db,update_dram_forms,print_config,import_config,export_config} ...

 

positional arguments:

{version,prepare_databases,set_database_locations,update_description_db,update_dram_forms,print_config,import_config,export_config}

version print DRAM version

prepare_databases Download and process databases for annotation

set_database_locations

Set database locations for already processed databases

update_description_db

Update description database

update_dram_forms Update DRAM distillate and liquor forms

print_config Print database locations

import_config Import CONFIG file

export_config Export CONFIG file

 

optional arguments:

-h, --help show this help message and exit

DRAM.py annotate -h

usage: DRAM.py annotate [-h] -i INPUT_FASTA [-o OUTPUT_DIR] [--min_contig_size MIN_CONTIG_SIZE] [--prodigal_mode {train,meta,single}]

                        [--trans_table {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}] [--bit_score_threshold BIT_SCORE_THRESHOLD]

                        [--rbh_bit_score_threshold RBH_BIT_SCORE_THRESHOLD] [--kofam_use_dbcan2_thresholds] [--custom_db_name CUSTOM_DB_NAME] [--custom_fasta_loc CUSTOM_FASTA_LOC]

                        [--custom_hmm_name CUSTOM_HMM_NAME] [--custom_hmm_loc CUSTOM_HMM_LOC] [--custom_hmm_cutoffs_loc CUSTOM_HMM_CUTOFFS_LOC] [--gtdb_taxonomy GTDB_TAXONOMY]

                        [--checkm_quality CHECKM_QUALITY] [--use_uniref] [--use_vogdb] [--low_mem_mode] [--skip_trnascan] [--keep_tmp_dir] [--threads THREADS] [--verbose]

 

optional arguments:

  -h, --help            show this help message and exit

  -i INPUT_FASTA, --input_fasta INPUT_FASTA

                        fasta file, optionally with wildcards to point to multiple fastas (default: None)

  -o OUTPUT_DIR, --output_dir OUTPUT_DIR

                        output directory (default: None)

  --min_contig_size MIN_CONTIG_SIZE

                        minimum contig size to be used for gene prediction (default: 2500)

  --prodigal_mode {train,meta,single}

                        Mode of prodigal to use for gene calling. NOTE: normal or single mode require genomes which are high quality with low contamination and long contigs (average length >3 Kbp).

                        (default: meta)

  --trans_table {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25}

                        Translation table for prodigal to use for gene calling. (default: 11)

  --bit_score_threshold BIT_SCORE_THRESHOLD

                        minimum bitScore of search to retain hits (default: 60)

  --rbh_bit_score_threshold RBH_BIT_SCORE_THRESHOLD

                        minimum bitScore of reverse best hits to retain hits (default: 350)

  --kofam_use_dbcan2_thresholds

                        Use dbcan2 suggested HMM cutoffs for KOfam annotation instead of KOfam recommended cutoffs. This will be ignored if annotating with KEGG Genes. (default: False)

  --custom_db_name CUSTOM_DB_NAME

                        Names of custom databases, can be usedmultiple times. (default: None)

  --custom_fasta_loc CUSTOM_FASTA_LOC

                        Location of fastas to annotate against, can be used multiple times butmust match nubmer of custom_db_name's (default: ())

  --custom_hmm_name CUSTOM_HMM_NAME

                        Names of custom hmm databases, can be used multiple times. (default: ())

  --custom_hmm_loc CUSTOM_HMM_LOC

                        Location of hmms to annotate against, can be used multiple times butmust match nubmer of custom_hmm_name's (default: ())

  --custom_hmm_cutoffs_loc CUSTOM_HMM_CUTOFFS_LOC

                        Location of file with custom HMM cutoffs and descriptions, can be used multiple times. (default: ())

  --gtdb_taxonomy GTDB_TAXONOMY

                        Summary file from gtdbtk taxonomy assignment from bins, can be used multipletimes (default: ())

  --checkm_quality CHECKM_QUALITY

                        Summary of of checkM quality assessment from bins, can be used multiple times (default: ())

  --use_uniref          Annotate these fastas against UniRef, drastically increases run time and memory requirements (default: False)

  --use_vogdb           Annotate these fastas against VOGDB, drastically decreases run time (default: False)

  --low_mem_mode        Skip annotating with uniref and use kofam instead of KEGG genes even if provided. Drastically decreases memory usage (default: False)

  --skip_trnascan

  --keep_tmp_dir

  --threads THREADS     number of processors to use (default: 10)

  --verbose

 

 

データベースの準備

DRAMを実行するには、アノテーションを取得するために必要なデータベースをセットアップする必要がある。KEGGを除くすべてのデータベースは、自動的にダウンロードして、使用できるように設計されている。

kegg.pepはKEGGからダウンロードしたアミノ酸fastaファイルへのパス。

DRAM-setup.py prepare_databases --output_dir DRAM_data --kegg_loc kegg.pep

#アミノ酸fastaファイルを指定しない(こちらを試した)
DRAM-setup.py prepare_databases --output_dir DRAM_data

 注意: DRAM のセットアップには長い時間 (最大 5 時間) がかかり、デフォルトでは大容量のメモリ (512 GB) を使用する。メモリ使用量を抑えるオプションも用意されている(Github参照)。より少ないメモリ使用量で行うには、-skip_uniref フラグを使用する。これによってKEGGKEGG Genes を提供しない場合は 64 gb まで、提供する場合は 128 gb までメモリ使用量を減らすことができる(マニュアルより)。

f:id:kazumaxneo:20220210210228p:plain



 

実行方法

DRAM

1、ゲノム配列(binned.fasta)を指定する。単一のゲノムファイル(もしくはメタゲノム全アセンブリ)に対してアノテーションを行う場合は、ヌクレオチドfastaのパスを直接指定する。

DRAM.py annotate -i 'my_bins/*.fa' -o annotation

 

2、アノテーションを付けたあと、これらを蒸留(distilling)してまとめる。

DRAM.py distill -i annotation/annotations.tsv -o genome_summaries --trna_path annotation/trnas.tsv --rrna_path annotation/rrnas.tsv

 

 

DRAM-v

VirSorterによって検出されたウイルスコンティグから、潜在的な補助代謝遺伝子( auxiliary metabolic genes (AMGs))をアノテーションする。

1、DRAM-vによってウイルスコンティグのアノテーションとdistilling を行うには、コンティグを前もってVirSorterで処理する必要がある。それから、VirSorterで得られたウイルスコンティグとVIRSorter_affi-contigs.tabを指定する。

DRAM-v.py annotate -i my_viral_contigs.fa -v VIRSorter_affi-contigs.tab -o annotation

ウイルスコンティグのフルアノテーションが行われる。

 

2、蒸留(distilling)する。

DRAM-v.py distill -i annotation/annotations.tsv -o annotation/distilled

 

 

DRAMはメモリ負荷が大きいため、高性能な(シングルノードの)計算機で動作させることを前提に設計されています。メモリ使用量の目安はGithubに書かれていますが、UniRef90でアノテーションを行う場合、約200GB以上のRAMが必要とのことです(データベースのバージョンによっても代わる)。注意して下さい。

引用

DRAM for distilling microbial metabolism to automate the curation of microbiome function
Michael Shaffer, Mikayla A Borton, Bridget B McGivern, Ahmed A Zayed, Sabina Leanti La Rosa, Lindsey M Solden, Pengfei Liu, Adrienne B Narrowe, Josué Rodríguez-Ramos, Benjamin Bolduc, M Consuelo Gazitúa, Rebecca A Daly, Garrett J Smith, Dean R Vik, Phil B Pope, Matthew B Sullivan, Simon Roux, Kelly C Wrighton

Nucleic Acids Research, Volume 48, Issue 16, 18 September 2020, Pages 8883–8900

 

関連


DRAMの代替にはこちらオススメです。