LEfSe学习[通俗易懂]
学习 通俗易懂 Lefse
2023-06-13 09:11:52 时间
大家好,又见面了,我是你们的朋友全栈君。
参考 : 微生物组间差异分析之LEfSe分析 LEfSe 分析, 你真的懂嘛? 微生物LEfSe分析图表解读
实栗操作:(待续)
#!/bin/sh
# in this script we show how to perform the biomarker discovery operation
# using LEfSe. The scripts require LEfSe to be installed and in the system path
# convert the sample names in the table of abundance into classes (i.e. the two bodysites)
sed 's/\([A-Z][A-Z]\)_\w*/\1/g' output/merged_abundance_table.txt > tmp/merged_abundance_table.4lefse.txt
# first LEfSe step: format the input specifying that the class info is in the first row
format_input.py tmp/merged_abundance_table.4lefse.txt tmp/merged_abundance_table.lefse -c 1 -o 1000000
# run the LEfSe biomarker discovery tool with default options apart for the
# threshold on the LDA effect size which is increaset to 4
run_lefse.py tmp/merged_abundance_table.lefse tmp/merged_abundance_table.lefse.out -l 4
# Plot the resulting list of biomarkers with the corresponsing effect size
plot_res.py --dpi 300 tmp/merged_abundance_table.lefse.out output_images/lefse_biomarkers.png
# Plot the biomarkers on the underlying cladogram
plot_cladogram.py --dpi 300 --format png tmp/merged_abundance_table.lefse.out output_images/lefse_biomarkers_cladogram.png
# Plot one features specifically (Firmicutes in this case)
plot_features.py -f one --feature_name "k__Bacteria.p__Firmicutes" tmp/merged_abundance_table.lefse tmp/merged_abundance_table.lefse.out Firmicutes.png
# Plot all biomarkes saving the images in one zip archive ("-f diff" is for plotting biomarkers only, with "-f all" one can plot all input features)
plot_features.py -f diff --archive zip tmp/merged_abundance_table.lefse tmp/merged_abundance_table.lefse.out biomarkers.zip
## 格式化输入表
format_input.py merged_abundance_table.4lefse.txt merged_abundance_table.lefse -c 1 -o 1000000
## LEfSe生物标记物发现工具可以与默认统计选项一起使用(-l 阈值的设置)
run_lefse.py merged_abundance_table.lefse merged_abundance_table.lefse.out -l 4
## 绘制具有相应效应大小的生成标记
plot_res.py --dpi 300 merged_abundance_table.lefse.out lefse_biomarkers.png
## 基础分类树上的生物标记
plot_cladogram.py --dpi 300 --format png merged_abundance_table.lefse.out lefse_biomarkers_cladogram.png
##
plot_features.py -f diff --archive zip merged_abundance_table.lefse merged_abundance_table.lefse.out biomarkers.zip
PS:
### merged_abundance_table.4lefse.txt
ID group1 group1 group1 group1 group2 group2 group2 group2
k__Archaea 0.01107 0.0 0.01438 0.0 0.00591 0.00909 0.0 0.00264 0.06548 0.06238
k__Archaea|p__Euryarchaeota 0.01107 0.0 0.01438 0.0 0.00591 0.00909 0.0 0.00264 0.06548 0.06238
k__Archaea|p__Euryarchaeota|c__Methanobacteria 0.01107 0.0 0.01438 0.0 0.00591 0.00909 0.0 0.00264 0.06548 0.06238
k__Archaea|p__Euryarchaeota|c__Methanobacteria|o__Methanobacteriales 0.01107 0.0 0.01438 0.0 0.00591 0.00909 0.0 0.00264 0.06548 0.06238
k__Archaea|p__Euryarchaeota|c__Methanobacteria|o__Methanobacteriales|f__Methanobacteriaceae 0.01107 0.0 0.01438 0.0 0.00591 0.00909 0.0 0.00264 0.06548 0.06238
k__Archaea|p__Euryarchaeota|c__Methanobacteria|o__Methanobacteriales|f__Methanobacteriaceae|g__Methanobrevibacter 0.01107 0.0 0.01438 0.0 0.00591 0.00909 0.0 0.00264 0.06548 0.06238
发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/139501.html原文链接:https://javaforall.cn
相关文章
- 2021电赛F题智能送药小车方案分析(openMV数字识别,红线循迹,STM32HAL库freeRTOS,串级PID快速学习,小车自动返回)[通俗易懂]
- python人工智能学习笔记_[Python] 人工智能与自然语言处理学习笔记(1)[通俗易懂]
- 5G/NR SSB学习总结[通俗易懂]
- 10 种机器学习算法的要点(附 Python 和 R 代码)「建议收藏」
- 学习PrintWriter类[通俗易懂]
- java fork join_java8学习:ForkJoin[通俗易懂]
- 报错注入学习[通俗易懂]
- python机器学习库sklearn——朴素贝叶斯分类器[通俗易懂]
- Python3 :PyCharm + Qt designer 学习 + 实例[通俗易懂]
- 独家 | 机器学习模型的非泛化和泛化
- 论机器学习领域的内卷:不读PhD,我配不配找工作?
- 系统学习Linux系统:记录成功之路(linux书记)
- 学习Linux:掌握重要的文件系统fs命令(linuxfs命令)
- 学习Linux:一步步掌握此多样化与实用的操作系统(自学linux看什么书)
- Linux学习之路:掌握网盘的技巧(linux教程网盘)
- 学习python的几条建议分享