目录

简介

meta分析流程中,注释到level1层级的基因数目统计图,默认是全部分组的,有客户需求按照分组去统计作图,现补充此部分。

主要思路是将全部分组的作图数据进行处理,得到各个分组的数据,带入流程进行作图。

功能

按照分组展示基因数目统计图。

数据准备

1. Unigenes.readsNum.even.xls,Unigenes.KEGG.anno.xls文件备份:

由于需要将Unigenes.readsNum.even.xls,Unigenes.KEGG.anno.xls拷贝到当前路径进行备份,后续需要将这两个文件按照分组进行拆分。

cp 03.GenePredict/GeneTable/Total/readsNum/Unigenes.readsNum.even.xls Unigenes.readsNum.even.xls-bak

cp 05.FunctionAnnotation/KEGG/KEGG_stat/Unigenes.KEGG.anno.xls Unigenes.KEGG.anno.xls-bak

2. 分组文件:

按照分组配置group.list1,每一个组配置一个group.list,文件名后面添加数字/组名加以区分

3. 各分组Unigenes.readsNum.even.xls,Unigenes.KEGG.anno.xls拆分文件:

perl /TJPROJ5/META_ASS/16s/chenjiawei/script/META/KEGG/kegg-unigenesnum/temp.pl group.list1 Unigenes.readsNum.even.xls-bak 

此步骤会生成临时文件temp1.xls

perl /TJPROJ5/META_ASS/16s/chenjiawei/script/META/KEGG/kegg-unigenesnum/temp2.pl temp1.xls

此步完成对Unigenes.readsNum.even.xls-bak文件的拆分,生成各分组的Unigenes.readsNum.even.xls

perl /TJPROJ5/META_ASS/16s/chenjiawei/script/META/KEGG/kegg-unigenesnum/temp3.pl Unigenes.KEGG.anno.xls-bak group.list1

此步完成对Unigenes.KEGG.anno.xls-bak文件的拆分,生成各分组的Unigenes.KEGG.anno.xls

数据分析

1. GeneNums下的丰度文件生成:

perl /PUBLIC/software/MICRO/share/MetaGenome_pipeline/MetaGenome_pipeline_V5.1/lib/05.Function/lib/KEGG/bin/3.num.abun.pl --anno Unigenes.KEGG.anno.xls --table Unigenes.readsNum.even.xls --outdir 绝对路径/group1 --prefix Unigenes.absolute

2. 分组基因数目统计图生成:

awk -F "\t" '{print $1"\t"$2"\t"$3}' 绝对路径/group1/GeneNums/Unigenes.absolute.level2.xls | perl -ne 'next if $_=~/^Others\t/;print;'> 绝对路径/group1/DrawAnnotationPic.R.txt

/PUBLIC/software/public/System/R-2.15.3/bin/Rscript /PUBLIC/software/MICRO/share/MetaGenome_pipeline/MetaGenome_pipeline_V5.1/lib/05.Function/lib/KEGG/bin/9.DrawAnnotationPic.R 绝对路径/group1/DrawAnnotationPic.R.txt 绝对路径/group1/kegg.unigenes.num

/usr/bin/convert -density 150 绝对路径/group1/kegg.unigenes.num.pdf 绝对路径/group1/kegg.unigenes.num.png

注:示例以一个组为例,多个分组需要多次分析。