【R语言】使用ALDEx2对微生物组进行差异分析

代码展示:

c 复制代码
library(ALDEx2)
rm(list = ls())
data(selex)
selex.sub <- selex[1:400,]
selex.sub[1:4,1:4]


input <- "Rhizosphere_Time4"

#input_list <- c("Rhizosphere_Time0","Rhizosphere_Time1","Rhizosphere_Time2","Rhizosphere_Time3","Rhizosphere_Time4")
input_list <- c("Root_Time1","Root_Time2","Root_Time3","Root_Time4")

for (input in input_list) {
otu_table <- read.delim(paste0(input,'_0.5wen.10050.asv_table.txt'), row.names = 1, sep = '\t', stringsAsFactors = FALSE, check.names = FALSE)
group <- read.delim(paste0('group2_',input,'.txt'),row.names = 1,sep = '\t') 


# 进行 Monte Carlo 采样和 CLR 转换
aldex_data <- aldex.clr(otu_table, conds = group$group1, mc.samples = 128, denom = "all")
# 进行 t 检验 和 Wilcoxon 检验
aldex_results <- aldex.ttest(aldex_data, paired = FALSE)
###--同--

# 显示显著 OTU
significant_OTUs <- aldex_results[aldex_results$wi.ep < 0.05, ]
head(significant_OTUs)

write.csv(significant_OTUs, paste0(input,'_sig.csv'))
}

参考:

1\]推荐使用ALDEx2的文献: [NC:基于38组数据评估14种微生物组差异分析方法---结果差异很大](https://blog.csdn.net/woodcorpse/article/details/125157755?spm=1001.2014.3001.5506) 原文: \[2\][使用 ALDEx2 进行差异分析](https://cloud.tencent.com/developer/article/1621879) \[3\]b站:[微生物差异分析2:Aldex2分析](https://www.bilibili.com/video/BV11HH6eiEtj/) \[4\]

相关推荐
CodeCraft Studio4 小时前
3D文档控件Aspose.3D实用教程:使用 C# 构建 OBJ 到 U3D 转换器
开发语言·3d·c#·3d渲染·aspose·3d文件格式转换·3d sdk
superlls4 小时前
(Redis)主从哨兵模式与集群模式
java·开发语言·redis
chenglin0165 小时前
C#_gRPC
开发语言·c#
骑驴看星星a6 小时前
数学建模--Topsis(Python)
开发语言·python·学习·数学建模
tju新生代魔迷7 小时前
C语言宏的实现作业
c语言·开发语言
yueyuebaobaoxinx8 小时前
MATLAB 与 Simulink 联合仿真:控制系统建模与动态性能优化
开发语言·matlab·性能优化
superlls9 小时前
(计算机网络)JWT三部分及 Signature 作用
java·开发语言·计算机网络
一只鲲9 小时前
56 C++ 现代C++编程艺术5-万能引用
开发语言·c++
liulilittle10 小时前
.NET反射与IL反编译核心技术
开发语言·数据库·c#·.net·反射·反编译·il
扛麻袋的少年10 小时前
6.Kotlin的Duration类
android·开发语言·kotlin