How to include other subclades/taxa in the resulting plot?

I used LEfSe v1.1.2 and processed my input ASV table using dokdo.

Hi LEfSe community! I would like to ask a question about the lefse_plot_res.py wrapper script. All of other processes before that ran smoothly. In my case, I wany to edit the resulting plot to have certain edits like having a title, autoscaling, and including other subclades/taxa in the plot, but my problem is that the following edits didn’t work for me. I provided my command below for you to check if I’ve missed something and I would like to know additional insights from you. You may also refer to my output attached. I am using Ubuntu WSL btw for commandline. Thank you very much in advance.

Command:
lefse_plot_res.py
output.res
output.pdf
–title Healthy vs. Diseased Biomarkers
–autoscale
–subclades 6
–all_feats
–format pdf

Error: Traceback (most recent call last):
File “/home/jkaligato/apps/miniforge3/envs/lefse/bin/lefse_plot_res.py”, line 10, in
sys.exit(plot_res())
^^^^^^^^^^
File “/home/jkaligato/apps/miniforge3/envs/lefse/lib/python3.12/site-packages/lefse/lefse_plot_res.py”, line 177, in plot_res
else: plot_histo_hor(params[‘output_file’],params,data,len(data[‘cls’]) == 2,params[‘report_features’])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/home/jkaligato/apps/miniforge3/envs/lefse/lib/python3.12/site-packages/lefse/lefse_plot_res.py”, line 104, in plot_histo_hor
if len(rr) > params[‘max_feature_len’]: rr = rr[:params[‘max_feature_len’]/2-2]+" […]"+rr[-params[‘max_feature_len’]/2+2:]
~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: slice indices must be integers or None or have an index method

Sorry for the slow reply! We’ll be making a more formal announcement about this soon, but as a preview, LEfSe is in a state of transition at the moment, with the older code base moving toward deprecation. We have two alternatives lined up for the community. The first, lefser, is a completely new implementation of the original LEfSe algorithsm in R (along with improvements) and is already available:

https://waldronlab.io/lefser/articles/lefser.html

The second, which is forthcoming, will be a simplified interface to MaAsLin 3 on our Galaxy server (tentatively called “MaAsLin 3 lite”) which will apply an updated statistical model to microbiome datasets suitable for analysis with LEfSe (i.e. having a categorical phenotype of interest and up to one other covariate to control). This Galaxy module is in internal testing now and we’ll announce it here when we’re ready for outside users. :slight_smile:

1 Like