python lefse

2023-01-17  本文已影响0人  胡童远

github: https://github.com/SegataLab/lefse

install

conda create -n lefse
conda activate lefse
conda install -c bioconda lefse

format

python ~/huty/softwares/miniconda3/envs/lefse/bin/lefse_format_input.py \
input_layer.txt input_layer.in -c 1 -u 2

-c指定分组行
-s指定亚组行,若没有可以不指定
-u指定样本编号
-o指定归一化后范围; -o 1000000

usage: lefse_format_input.py INPUT_FILE OUTPUT_FILE
--output_table OUTPUT_TABLE  the formatted table in txt format
-f {c,r}              set whether the features are on rows (default) or on columns
-c [1..n_feats]       set which feature use as class (default 1)
-s [1..n_feats]       set which feature use as subclass (default -1 meaning no subclass)
-u [1..n_feats]       set which feature use as subject (default -1 meaning no subject)
-o float              set the normalization value (default -1.0 meaning no normalization)

analysis

python ~/huty/softwares/miniconda3/envs/lefse/bin/lefse_run.py \
input_layer.in input_layer.res
-a float        set the alpha value for the Anova test (default 0.05)
-w float        set the alpha value for the Wilcoxon test (default 0.05)
-l float        set the threshold on the absolute value of the logarithmic LDA score (default 2.0)

过程

# layer
Number of significantly discriminative features: 6806 ( 6806 ) before internal wilcoxon
Number of discriminative features with abs LDA score > 2.0 : 1169
# site
Number of significantly discriminative features: 127 ( 737 ) before internal wilcoxon
Number of discriminative features with abs LDA score > 2.0 : 1

参考:
宏基因组数据分析:差异分析(LEfSe安装使用及LDA score计算)

上一篇 下一篇

猜你喜欢

热点阅读