macでインフォマティクス

macでインフォマティクス

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

メタゲノムのビニングを行う MetaBAT2

2020 4/4 追記

2021 5/30 help更新

 

 微生物の分離と培養に基づく微生物群集の研究は、高スループットの全ゲノムショットガンシーケンスベースのメタゲノムに徐々に置き換えられている(Van Dijk et al、2014; Tringe&Rubin、2005でレビュー)。計算メタゲノムの進歩により、ディープメタゲノムシーケンスから派生した数十億のショートシーケンスリードをより大きなフラグメント(コンティグ)にアセンブルし、メタゲノムビニングによってドラフトゲノムにグループ化するツールが作成された(Kang、Rubin&Wang、2016でレビュー)。

最近、いくつかの自動ビニングツールが利用可能になり、メタゲノムビニングのエキサイティングな進歩を目の当たりにした。本著者らのグループは2015年にMetaBAT(Kang et al。、2015)を開発したが、MyCC(Lin&Liao、2016)、MaxBin 2.0(Wu、Simmons&Singer、2015)、MetaWatt-3.5、およびCONCOCT(Alneberg et al。、2014)など、ほぼ同時期に開発されたツールがいくつか存在する(Strous et al、2012)。これらのビニングソフトウェアツールは、シミュレートされたデータまたは実世界のデータでさまざまな範囲の成功を達成している。ただし、実際には、ビニング実験の品質は、基礎となるデータセットの特性、したがってビニングパラメーターの選択に大きく依存している。ユーザーと本著者らは独自に、MetaBATのビニングのパフォーマンスはパラメーターの選択によって大きく異なる可能性があることを観察使た。確立されたパラメーター最適化方法がないため、包括的なビニング結果を得るには、異なるパラメーターセットで複数のビニング実験を実行し、結果をマージする必要がある。たとえば、1,500を超えるメタゲノムデータセットの最近の大規模な研究では、それぞれが異なるパラメーターセットから派生した5つのMetaBATビニング結果をマージすることにより、8,000のドラフトゲノムが取得された(Parks et al、2017, pubmed)。

  CAMIメタゲノムビニングチャレンジの最近の重要な評価(Sczyrba et al、2017)では、MetaBATは数百万のコンティグを持つ大規模なメタゲノムデータセットを処理するためにスケールアップできる最速かつ最も堅牢なソフトウェアである。ただし、さまざまなデータセットに対するビニングパフォーマンスが一貫していないため、精度は最高ではなかった。したがって、この研究では、コアビニングアルゴリズムを完全に新しいアルゴリズムに置き換え、MetaBAT2(元のMetaBATは以後MetaBAT1と呼ぶ)を報告した。新しいアルゴリズムは、いくつかの新しい側面で構成されている:(1)正規化されたテトラヌクレオチド頻度(TNF)スコア、(2)クラスタリングのためのグラフ構造と反復グラフ分割手順、および(3)より小さなコンティグをリクルートするための追加ステップ。さらに、計算の効率が大幅に向上し、計算の増加がプログラムのスケーラビリティに影響を与えない。

 MetaBAT2は、研究コミュニティによってBiocondaパッケージおよびDOE Knowledgebaseプラットフォーム(https://kbase.us)の標準APPとしてパッケージ化されている。 Dockerイメージも利用できる(https://hub.docker.com/r/metabat/metabat)。 (以下略) 

 

 

 

インストール

オーサーらが準備したdockerイメージをpullしてテストした。

依存

  • boost >= 1.59.0 (dev and libs for boost_graph, system, filesystem and serialization)
  • python >= 2.7
  • cmake >= 3.8.2
  • gcc/g++ >= 4.9 or intel >= 18.0.1.163 or llvm >= 8.0

本体 Bitbucket

https://bitbucket.org/berkeleylab/metabat/src/master/

#docker image
docker pull metabat/metabat:latest

#bioconda (link) metabat2とmetabat1の両方がインストールされる
conda install -c bioconda -y metabat2

> metabat2

$ metabat2

 

MetaBAT: Metagenome Binning based on Abundance and Tetranucleotide frequency (version 2:2.15 (Bioconda); 2020-07-03T13:02:15)

by Don Kang (ddkang@lbl.gov), Feng Li, Jeff Froula, Rob Egan, and Zhong Wang (zhongwang@lbl.gov) 

 

Allowed options:

  -h [ --help ]                     produce help message

  -i [ --inFile ] arg               Contigs in (gzipped) fasta file format [Mandatory]

  -o [ --outFile ] arg              Base file name and path for each bin. The default output is fasta format.

                                    Use -l option to output only contig names [Mandatory].

  -a [ --abdFile ] arg              A file having mean and variance of base coverage depth (tab delimited; 

                                    the first column should be contig names, and the first row will be 

                                    considered as the header and be skipped) [Optional].

  -m [ --minContig ] arg (=2500)    Minimum size of a contig for binning (should be >=1500).

  --maxP arg (=95)                  Percentage of 'good' contigs considered for binning decided by connection

                                    among contigs. The greater, the more sensitive.

  --minS arg (=60)                  Minimum score of a edge for binning (should be between 1 and 99). The 

                                    greater, the more specific.

  --maxEdges arg (=200)             Maximum number of edges per node. The greater, the more sensitive.

  --pTNF arg (=0)                   TNF probability cutoff for building TNF graph. Use it to skip the 

                                    preparation step. (0: auto).

  --noAdd                           Turning off additional binning for lost or small contigs.

  --cvExt                           When a coverage file without variance (from third party tools) is used 

                                    instead of abdFile from jgi_summarize_bam_contig_depths.

  -x [ --minCV ] arg (=1)           Minimum mean coverage of a contig in each library for binning.

  --minCVSum arg (=1)               Minimum total effective mean coverage of a contig (sum of depth over 

                                    minCV) for binning.

  -s [ --minClsSize ] arg (=200000) Minimum size of a bin as the output.

  -t [ --numThreads ] arg (=0)      Number of threads to use (0: use all cores).

  -l [ --onlyLabel ]                Output only sequence labels as a list in a column without sequences.

  --saveCls                         Save cluster memberships as a matrix format

  --unbinned                        Generate [outFile].unbinned.fa file for unbinned contigs

  --noBinOut                        No bin output. Usually combined with --saveCls to check only contig 

                                    memberships

  --seed arg (=0)                   For exact reproducibility. (0: use random seed)

  -d [ --debug ]                    Debug output

  -v [ --verbose ]                  Verbose output

 

 

実行方法

contigと、そのcontigにmappingして得たbamファイルを指定する。

docker run --rm -w $(pwd) -v $(pwd):$(pwd) metabat/metabat:latest \
runMetaBat.sh test/contigs.fa test/contigs-1000.fastq.bam

 

複数のbamファイル

docker run --rm -w $(pwd) -v $(pwd):$(pwd) metabat/metabat:latest \
runMetaBat.sh contigs.fa sample1.bam sample2.bam sample3.bam ...

 

ラッパーを使わず順番に実行する。

1, bamの作成

2, depth fileの出力
jgi_summarize_bam_contig_depths --outputDepth depth.txt input*.bam

3A, metabat1
mkdir metabat1_outdir
metabat1 -i ASSEMBLY/final_assembly.fasta -a depth.txt -o metabat1_outdir/metabat1 -t 20

3B, metabat2
mkdir metabat2_outdir
metabat2 -i ASSEMBLY/final_assembly.fasta -a depth.txt -o metabat1_outdir/metabat2 -t 20

 

 

 

引用

MetaBAT 2: an adaptive binning algorithm for robust and efficient genome reconstruction from metagenome assemblies
Dongwan D. Kang, Feng Li, Edward Kirton, Ashleigh Thomas, Rob Egan, Hong An, Zhong Wang

PeerJ. February 6, 2019

https://peerj.com/preprints/27522/

 

関連