Normlize by subsample
使用vegan包进行等量重抽样,输入reads count格式Feature表result/otutab.txt可指定输入文件、抽样量和随机数,输出抽平表result/otutab_rare.txt和多样性alpha/vegan.txt
mkdir -p results/alpha Rscript script/otutab_rare.R --input results/otutab.txt \ --depth 10000 --seed 1 \ --normalize results/otutab_rare.txt \ --output results/alpha/vegan.txt
otutab_rare.txt
vegan.txt
抽平前
usearch -otutab_stats results/otutab.txt \ -output results/otutab.stat 220951 Reads (221.0k) 18 Samples 1521 OTUs 27378 Counts 5170 Count =0 (18.9%) 4891 Count =1 (17.9%) 4017 Count >=10 (14.7%) 437 OTUs found in all samples (28.7%) 609 OTUs found in 90% of samples (40.0%) 1426 OTUs found in 50% of samples (93.8%) Sample sizes: min 11028, lo 11646, med 12434, mean 12275.1, hi 12701, max 13786
抽平后
usearch -otutab_stats results/otutab_rare.txt \ -output results/otutab_rare.stat 180000 Reads (180.0k) 18 Samples 1521 OTUs 27378 Counts 6222 Count =0 (22.7%) 5415 Count =1 (19.8%) 3345 Count >=10 (12.2%) 360 OTUs found in all samples (23.7%) 515 OTUs found in 90% of samples (33.9%) 1386 OTUs found in 50% of samples (91.1%) Sample sizes: min 10000, lo 10000, med 10000, mean 10000.0, hi 10000, max 10000