Lefse galaxy and conda codes

Dear all,

I am aware that Lefse galaxy module is having issues. However, I want to use conda codes to run the analysis. Could someone please share the codes and sample data to do the analysis? I tried to find codes from websites but they are very confusing. Any help is highly appreciated! Thank you

1 Like

this creates a conda environment called lefse:
conda create -n lefse

this activates the environment:
conda activate lefse

this will install the package using bioconda:
conda install -c bioconda lefse

then replace the format script with the one here:

this makes the new format script script accessible:
chmod + x lefse_format_input.py

this formats your table, be sure to have your treatments in the first row (i.e. class) and your subtreatments in the second row if you have any (subclass; the following script assigns -1 to subclass meaning you have none, so change that number to the row containing your subclass if you have one; use lefse_format_input.py -h for a list of variables)
lefse_format_input.py lefse_matrix.txt lefse_matrix.in -c 1 -s -1 -u 2 -o 1000000

this runs lefse:
lefse_run.py lefse_matrix.in lefse_matrix.res

this creates the barplot:
lefse_plot_res.py lefse_matrix.res lefse_matrix.res.svg --format svg

this creates the cladogram (still unsure why the shading wedges are not centered and would love to know how to fix that):
lefse_plot_cladogram.py lefse_matrix.res lefse_cladogram.svg --format svg

I was similarly having troubles and this worked for me. I am a novice, just hoping to help.

Thank you so much!
I will try this

1 Like