稀释曲线是利用已测得16S rDNA序列中已知的各种OTU的相对比例,来计算抽取n个(n小于测得reads序列总数)reads时出现OTU数量的期望值,然后根据一组n值(一般为一组小于总序列数的等差数列)与其相对应的OTU数量的期望值做出曲线来
通过qiime 的alpha_rarefaction.py (计算稀释丰度)获取各个类型的矩阵表达表
## 1
$ alpha_rarefaction.py -i otu_tax_table.biom -f -p alpha_params.txt -o result -m sample_info.txt
## 2
$ head alpha_params.txt
alpha_diversity:metrics observed_species,shannon,chao1,simpson
## 3
$ head sample_info.txt
#sampleid group
S1 1
S2 2
S3 3
T1 1
T2 2
T3 3
## 参考format
http://qiime.org/documentation/file_formats.html#id-to-taxonomy-map
http://qiime.org/documentation/qiime_parameters_files.html
## 将上述的得到的结果用做绘制R图的输入文件
setwd("D:/16S/16sRscript")
library("ggplot2")
library("reshape2")
library("tidyr")
inputfile = c("observed_species.txt")
output