macでインフォマティクス

macでインフォマティクス

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

コンポジション、カバレッジ、アセンブリグラフによるメタゲノムビニングを行う MetaCoAG

2021 10/8 追記

 

 メタゲノムビニングにより、様々な種の様々な遺伝物質を研究し、特性を明らかにし、微生物群集についての洞察を得ることができるようになった。既存のビニングツールはメタゲノミクスのde novoアセンブリをビニングするが、アセンブリグラフを利用していない。ここでは、メタゲノムコンティグをビニングするために、組成とカバレッジ情報を持つアセンブリグラフを利用するツール、MetaCoAGを提案する。MetaCoAGは、シングルコピーのマーカー遺伝子を用いて初期ビンの数を推定し、コンティグを反復的にビンに割り当て、ビン化プロセス中にビンの数を動的に調整する。シミュレーションと実データセットを用いた実験の結果、MetaCoAGは最新のビニングツールを大幅に凌駕し、2番目に優れたツールよりも高品質なビンを生成し、F1スコアの平均値は88.40%となった。著者らの知る限り、MetaCoAGはアセンブリグラフ情報を直接利用した初めてのスタンドアローンのビン化ツールである。MetaCoAGは、https://github.com/Vini2/MetaCoAGから利用できる。

 

インストール

ubuntu18のdockerイメージを使ってテストした(オーサーの説明している手順にしたがってpython3.7の仮想環境でテスト)。

依存

MetaCoAG installation requires Python 3.7 (tested on Python 3.7.4). You will need the following python dependencies to run MetaCoAG and related support scripts.

  • python-igraph - version 0.9.6
  • biopython - version 1.74
  • networkx - version 2.4
  • scipy - version 1.3.1
  • numpy - version 1.17.2
  • tqdm - version 4.36.1

MetaCoAG uses the following tools to scan for single-copy marker genes. These tools are included with the following versions.

  • FragGeneScan - version 1.31
  • HMMER - version 3.3

本体 Github

git clone https://github.com/Vini2/MetaCoAG.git
cd MetaCoAG/
unzip auxiliary.zip
mamba env create -f environment.yml
conda activate metacoag

MetaCoAG -h

usage: MetaCoAG [-h] --assembler ASSEMBLER --graph GRAPH --contigs CONTIGS

                --abundance ABUNDANCE [--paths PATHS] --output OUTPUT

                [--prefix PREFIX] [--min_length MIN_LENGTH]

                [--p_intra P_INTRA] [--p_inter P_INTER] [--d_limit D_LIMIT]

                [--depth DEPTH] [--mg_threshold MG_THRESHOLD]

                [--bin_mg_threshold BIN_MG_THRESHOLD] [--delimiter DELIMITER]

                [--nthreads NTHREADS] [-v]

 

MetaCoAG is a metagenomic contig binning tool that makes use of the

connectivity information found in assembly graphs, apart from the composition

and coverage information. MetaCoAG makes use of single-copy marker genes along

with a graph matching technique and a label propagation technique to bin

contigs.

 

optional arguments:

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

  --assembler ASSEMBLER

                        name of the assembler used. (Supports SPAdes, MEGAHIT

                        and Flye)

  --graph GRAPH         path to the assembly graph file

  --contigs CONTIGS     path to the contigs file

  --abundance ABUNDANCE

                        path to the abundance file

  --paths PATHS         path to the contigs.paths file

  --output OUTPUT       path to the output folder

  --prefix PREFIX       prefix for the output file

  --min_length MIN_LENGTH

                        minimum length of contigs to consider for binning.

                        [default: 1000]

  --p_intra P_INTRA     minimum probability of an edge matching to assign to

                        the same bin. [default: 0.1]

  --p_inter P_INTER     maximum probability of an edge matching to create a

                        new bin. [default: 0.01]

  --d_limit D_LIMIT     distance limit for contig matching. [default: 20]

  --depth DEPTH         depth to consider for label propagation. [default: 10]

  --mg_threshold MG_THRESHOLD

                        length threshold to consider marker genes. [default:

                        0.5]

  --bin_mg_threshold BIN_MG_THRESHOLD

                        minimum fraction of marker genes that should be

                        present in a bin. [default: 0.33333]

  --delimiter DELIMITER

                        delimiter for output results. Supports a comma (,), a

                        semicolon (;), a tab ($'\t'), a space (" ") and a pipe

                        (|) [default: , (comma)]

  --nthreads NTHREADS   number of threads to use. [default: 8]

  -v, --version         show program's version number and exit

 

 

実行方法

GFA形式のアセンブリグラフファイル、コンティグのfastaとpathファイル、コンティグのアバンダンスファイル(*1)、出力ディレクトリを指定する。

./MetaCoAG --assembler spades --graph graph_file.gfa --contigs contigs.fasta --paths contigs.paths --abundance abundance.tsv --output outdir

出力例

f:id:kazumaxneo:20211007234015p:plain

outdir/bins/

f:id:kazumaxneo:20211007234919p:plain

 

引用

MetaCoAG: Binning Metagenomic Contigs via Composition, Coverage and Assembly Graphs
Vijini Mallawaarachchi, Yu Lin

bioRxiv, Posted September 11, 2021

 

関連


*1

ここではbbmapを使った。

> bbmap.sh  -Xmx150g nodisk in1=read_R1.fq.gz in2=read_R2.fq.gz covstats=mapping.stats ref=contigs.fasta

> cut -f 1,2 mapping.stats |grep -v "#" - > abundance.tsv