メタゲノミクスの分野では、微生物群集の構造、多様性、生態についての貴重な知見が得られている。メタゲノム解析の重要なステップの1つは、長いコンティグにリードをアセンブリし、メタゲノムサンプル中に存在する異なる種に属するコンティグのグループにビン化することである。コンティグのビン化はメタゲノム解析において重要な役割を果たしており、ほとんどのビニングアルゴリズムは、オリゴヌクレオチド/k-mer組成やコンティグカバレッジなどのゲノムの特徴を利用してコンティグをビニングする。メタゲノムのコンティグはアセンブリプロセスから得られるため、コンティグ間の接続性に関する貴重な情報が含まれているアセンブリグラフはビニングに利用できる。
本論文では、既存のツールのビニング結果を改良するために、アセンブリグラフを利用し、ラベル伝播アルゴリズムを適用した新しいビニング手法GraphBinを提案する。本論文では、de Bruijn graphとオーバーラップ・レイアウト・コンセンサス法の両方から構成されたアセンブリグラフを利用できることを示す。さらに、誤ってビニングされたコンティグの識別や、既存のビニングツールでは捨てられていたコンティグのビニングについても、実験的に改善された結果が得られた。アセンブリグラフの情報がメタゲノムコンティグのビニングツールに利用されたのは初めてのことである。
インストール
git clone https://github.com/Vini2/GraphBin.git
cd GraphBin/
conda env create -f environment.yml
conda activate graphbin
> python graphbin.py -h
$ python graphbin.py -h
usage: graphbin.py [-h] --assembler ASSEMBLER --graph GRAPH [--paths PATHS] --binned BINNED --output OUTPUT [--prefix PREFIX] [--max_iteration MAX_ITERATION]
[--diff_threshold DIFF_THRESHOLD]
GraphBin Help. GraphBin is a metagenomic contig binning tool that makes use of the contig connectivity information from the assembly graph to bin contigs. It utilizes the
binning result of an existing binning tool and a label propagation algorithm to correct mis-binned contigs and predict the labels of contigs which are discarded due to short
length.
optional arguments:
-h, --help show this help message and exit
--assembler ASSEMBLER
name of the assembler used (SPAdes, SGA or MEGAHIT)
--graph GRAPH path to the assembly graph file
--paths PATHS path to the contigs.paths file
--binned BINNED path to the .csv file with the initial binning output from an existing tool
--output OUTPUT path to the output folder
--prefix PREFIX prefix for the output file
--max_iteration MAX_ITERATION
maximum number of iterations for label propagation algorithm. [default: 100]
--diff_threshold DIFF_THRESHOLD
difference threshold for label propagation algorithm. [default: 0.1]
テストラン
#megahitの場合
python graphbin.py --assembler megahit --graph test_data/ES_MEGAHIT/final.gfa --binned test_data/ES_MEGAHIT/maxbin_contig_bins.csv --output output_dir/
> ls -l output_dir/
$ ls -l output_dir/
total 144
-rw-r--r-- 1 kazuma staff 2280 5 19 00:12 graphbin.log
-rw-r--r-- 1 kazuma staff 2652 5 19 00:12 graphbin_output.csv
-rw-r--r-- 1 kazuma staff 61788 5 19 00:12 graphbin_unbinned.csv
実行方法
SGA、megahit、metaspadesのアセンブリグラフに対応している。
1, 外部ビニングツールを使って binningを実行
2、binning結果をまとめたCSVファイルを出力
python GraphBin/support/prepResult.py --binned <path>/<to>/binning_result_dir --assembler SPAdes/SGA/MEGAHIT --output output_dir
3、graphbinの実行
metaspadesのアセンブリグラフを使う。
python graphbin.py --assembler spades \
--graph graph.gfa \
--paths pathsfile.paths\
--binned binning_result.csv \
--output output_dir
megahitのアセンブリグラフを使う。
python graphbin.py --assembler megahit \
--graph graph.gfa \
--binned binning_result.csv \
--output output_dir
sgaのアセンブリグラフを使う。
python graphbin.py --assembler sga \
--graph graph_file.asqg \
--binned binning_result.csv \
--output output_dir
引用
GraphBin: refined binning of metagenomic contigs using assembly graphs
Vijini Mallawaarachchi, Anuradha Wickramarachchi, Yu Lin
Bioinformatics, Published: 13 March 2020