python lefse

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

參考:
宏基因組數(shù)據(jù)分析:差異分析(LEfSe安裝使用及LDA score計算)

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容