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)
-y {0,1} (for multiclass tasks) set whether the test is performed in
a one-against-one ( 1 - more strict!) or in a one-against-
all setting ( 0 - less strict) (default 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
過程
Number of significantly discriminative features: 7 ( 7 ) before internal wilcoxon
Number of discriminative features with abs LDA score > 2.0 : 7
R[write to console]: Warning messages:
R[write to console]: 1: package ‘survival’ was built under R version 4.2.2
R[write to console]: 2: package ‘mvtnorm’ was built under R version 4.2.1
R[write to console]: 3: package ‘modeltools’ was built under R version 4.2.1
R[write to console]: 4: package ‘coin’ was built under R version 4.2.1
參考:
宏基因組數據分析:差異分析(LEfSe安裝使用及LDA score計算)