这次我们分享,trans_venn类用于venn分析。trans_alpha class,Alpha多样性可以使用trans_alpha类进行转换和绘制。
为了分析组的唯一otu和共享otu,我们首先根据sample_table中的“Group”列合并样本。
dataset1 t1 t1$plot_venn()
#当组数过多,无法用维恩图表示时,可以用花瓣图表示。
dataset1 t1 t1$plot_venn(petal_plot = TRUE)
Alpha多样性可以使用trans_alpha类进行转换和绘制
> t1 t1 trans_alpha object: data_alpha have 7 columns: Sample, Measure, Value, SampleID, Group, Type, Saline data_alpha$Measure: Observed, Chao1, ACE, Shannon, Simpson, InvSimpson, Fisher, Pielou, Coverage data_stat have 6 columns: Group, Measure, N, Mean, SD, SE > # return t1$alpha_stat > t1$data_stat[1:5, ] Group Measure N Mean SD SE 1 CW Observed 30 1843.166667 220.57918796 40.272065654 2 CW Chao1 30 2552.635929 338.11686659 61.731411634 3 CW ACE 30 2715.680687 367.02577198 67.009431500 4 CW Shannon 30 6.307972 0.53551395 0.097771024 5 CW Simpson 30 0.989680 0.01304767 0.002382167
> t1$cal_diff(method = "KW") The result is stored in object$res_diff ... > # return t1$res_alpha_diff > t1$res_diff[1:5, ] Comparison Measure Test_method Group P.unadj P.adj Significance 1 IW - CW - TW Observed Kruskal-Wallis Rank Sum Test IW 0.15504659 0.27908386 ns 2 IW - CW - TW Chao1 Kruskal-Wallis Rank Sum Test IW 0.01696123 0.05088368 ns 3 IW - CW - TW ACE Kruskal-Wallis Rank Sum Test IW 0.01333436 0.05088368 ns 4 IW - CW - TW Shannon Kruskal-Wallis Rank Sum Test IW 0.53187046 0.79780569 ns 5 I服务器托管网W - CW - TW Simpson Kruskal-Wallis Rank Sum Test CW 0.80832094 0.90936106 ns |
> t1$cal_diff(method = "anova") Perform post hoc test with the method: duncan.test ... The result is stored in object$res_diff ... > t1$res_diff Measure Test_method Group Letter 1 Observed anova IW a 2 Observed anova TW a 3 Observed anova CW a 4 Chao1 anova IW a 5 Chao1 anova TW ab 6 Chao1 anova CW b 7 ACE anova IW a 8 ACE anova TW b 9 ACE anova CW b 10 Shannon anova IW a 11 Shannon anova TW a 12 Shannon anova CW a 13 Simpson anova IW a 14 Simpson anova TW a 15 Simpson anova CW a 16 InvSimpson anova IW a 17 InvSimpson anova TW a 18 InvSimpson anova CW a 19 Fisher anova IW a 20 Fisher anova TW a 21 Fisher anova CW a 22 Pielou anova IW a 23 Pielou anova TW a 24 Pielou anova CW a 25 Coverage anova CW a 26 Coverage anova TW a 27 Coverage anova IW b
#现在,让我们绘制每个组的alpha多样性的平均值和se,并添加duncan。
> t1$plot_alpha(add_letter = T, measure = “Chao1”, use_boxplot = FALSE)
> t1$plot_alpha(pair_compare = F, measure = “Chao1”, shape = “Group”)
今天,我发现一个很尴尬的问题,就是这个包更新了,兄弟以前的代码不能直接跑了。我尽量把它跑完。这些都是我跑完之服务器托管网后分享的,大家可以先跑。
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
相关推荐: 为什么从没有负值的数据中绘制的小提琴图(Violin Plot)会出现负值部分?
CSDN 叶庭云:https://yetingyun.blog.csdn.net/ 小提琴图(Violin Plot) 是一种用于展示和比较数据分布的可视化工具。它结合了箱形图(Box Plot)和密度图(Kernel Density Plot)的特点:中间有…