该问题已被锁定!
2
关注
795
浏览

补全OTU表

查看全部 2 个回答

起始于南农 初级会员 用户来自于: 北京市
2023-06-27 10:08
#用blast的结果将qiime2分类器注释结果进行补全
temp1_taxonomy <- blast.tax[,1] %>% left_join(taxonomy, by = "OTU_ID")

#判断两个数据框每行的OTU是否对应,才能开始下一步
blast.tax$OTU_ID == temp1_taxonomy$OTU_ID

#改为数据框格式
blast.tax <- blast.tax %>% as.data.frame()
temp1_taxonomy <- temp1_taxonomy %>% as.data.frame()

# 获取第一个表格【temp1_taxonomy】中 "unidentified" 值的位置信息
coordinate_information <- which(temp1_taxonomy == "unidentified", arr.ind = TRUE)

# 使用位置信息从第二个表格【blast.tax】中提取对应位置的值
replacement_values <- blast.tax[coordinate_information]

# 将第一个表格中的 "unidentified" 值替换为第二个表格中对应位置的值
temp1_taxonomy[temp1_taxonomy == "unidentified"] <- replacement_values














问题动态

发布时间
2023-06-26 22:19
更新时间
2023-06-30 00:04
关注人数
2 人关注

相关问题

不同样品中寻找特异的OTU

推荐内容

编程
编程
请问在不考虑测序质量的情况下,如何根据bam文件获得比对到指定position的碱基?
编程
linux bash编程debug
All Rights Reserved Powered BY WeCenter V4.1.0 © 2024