导读
分箱就是将宏基因组测序数据组装得到的contigs根据四核苷酸频率和丰度模式进行打包分类的过程,一个包裹也就是一个Bin代表一种微生物。Metawrap的Blobology模块使用计算得到contig N50和contig 丰度信息可以给contig绘制二维图,并根据Bin类别给contig着色,相同颜色的contig来自同一个Bin。该模块还能给Bin做分类学注释。
文献:
Blobology: exploring raw genome data for contaminants, symbionts and parasites using taxon-annotated GC-coverage plots. Front Genet 2013
工作流程:
结果举例:
一、安装(集成在metawap中)
安装好metawap利用其中的bloboly功能即可进行此分析。metawap是一个集成软件,包含分箱分析的各个步骤所需的140+软件。依赖数据库也非常大,共250多G。分析流程不一定非要使用Metawrap流程(太耗费资源),完全可以根据自己的需求自定义。不可否认的是它里面所带的软件很好用。
软件地址:https://github.com/bxlab/metaWRAP
分析流程:https://github.com/bxlab/metaWRAP/blob/master/Usage_tutorial.md
conda安装(Better installation):
conda create -y -n metawrap-env python=2.7
source activate metawrap-env
# Note: ordering is important
conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda
conda config --add channels ursky
conda install -y -c ursky metawrap-mg
# Note: may take a while
# To fix the CONCOCT endless warning messages in metaWRAP=1.2, run
conda install -y blas=2.5=mkl
依赖数据库:如下表
数据库安装方法:https://github.com/bxlab/metaWRAP/blob/master/installation/database_installation.md
二、Blobology可视化Bin
共组装共Bin的可视化(一行命令):
source activate metawrap-env
# 进入metawrap工作环境
metawrap blobology -t 16 -o Bin_blobology/ --bins Bin/ -a contigs.fa
参数:
-t # 线程
-o # 输出文件夹(自动新建)
--bins # bin所在文件夹
-a # contig文件所在文件夹
单样本组装和Bin的可视化(shell循环):
source activate metawrap-env
# 进入metawrap工作环境
for I in assembly_contigs/*.contigs.fa; do
BASE=${I#*/}
SAMPLE=${BASE%%.*}
metawrap blobology -t 16 -o bin_blobology/$SAMPLE/ --bins bin/$SAMPLE/ -a $I raw_all/${SAMPLE}_*.fastq &
done
参数:
for xx in xx; do xx done # for循环语法
"#" # 最长截取字符串某符号右边的部分
"##" # 最短截取字符串某符号右边的部分
"%" # 最长截取字符串某符号左边的部分
"%%" # 最短截取字符串某符号左边的部分
三、可视化结果
查看结果文件:
ll # 查看:
drwxrwxr-x 4 cheng WST 4096 9月 26 20:23 ./
drwxrwxr-x 6 cheng WST 4096 9月 26 19:13 ../
-rw-rw-r-- 1 cheng WST 1156372 9月 26 20:23 all.contigs.binned.blobplot
-rw-rw-r-- 1 cheng WST 20557217 9月 26 20:23 all.contigs.blobplot
-rw-rw-r-- 1 cheng WST 90720221 9月 26 19:13 all.contigs.fa
-rw-rw-r-- 1 cheng WST 39182153 9月 26 20:14 all.contigs.fa.1.bt2
-rw-rw-r-- 1 cheng WST 21509212 9月 26 20:14 all.contigs.fa.2.bt2
-rw-rw-r-- 1 cheng WST 1044863 9月 26 20:14 all.contigs.fa.3.bt2
-rw-rw-r-- 1 cheng WST 21509206 9月 26 20:14 all.contigs.fa.4.bt2
-rw-rw-r-- 1 cheng WST 39182153 9月 26 20:14 all.contigs.fa.rev.1.bt2
-rw-rw-r-- 1 cheng WST 21509212 9月 26 20:14 all.contigs.fa.rev.2.bt2
-rw-rw-r-- 1 cheng WST 1315814 9月 26 20:14 all.contigs.nt.1e-5.megablast
drwxrwxr-x 2 cheng WST 4096 9月 26 20:23 blobplot_figures/
drwxrwxr-x 2 cheng WST 4096 9月 26 20:23 blobplot_figures_only_binned_contigs/
此分析得到的可视化结果分为两类:一类是所有 contigs 的可视化结果,存放在“blobplot_figures”文件夹中;另一类是被分到Bin中的contigs的可视化结果,存放在“blobplot_figures_only_binned_contigs”文件夹中。
被分到Bin中的contigs的可视化结果,如下(共组装共Bin):
说明:
上图是每个 Bin 中的 contigs 的分布可视化结果。横坐标是 contig 的 GC 含量;纵坐标是 contig 丰度;一个点代表一个 contig,相同颜色的 contig 来自同一个 Bin。
相关阅读:
宏基因组分箱(一)Megahit组装和QUAST质量评价
宏基因组分箱(二)Metabat2分箱实战