# LEfSe Formatting Error

**URL:** <https://help.galaxyproject.org/t/lefse-formatting-error/908>\
**Category:** Uncategorized\
**Tags:** galaxy-local, lefse, mothur\
**Created:** [March 25, 2019, 8:29pm UTC](https://help.galaxyproject.org/t/lefse-formatting-error/908 "2019-03-25T20:29:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rbrewster](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@rbrewster](https://help.galaxyproject.org/u/rbrewster)\
**Post date:** [March 25, 2019, 8:29pm UTC](https://help.galaxyproject.org/t/lefse-formatting-error/908/1 "2019-03-25T20:29:18Z")

</div>

I am attempting to run LEfSe on metagenomic data from the microbiome. We have used the same classification database many times without issue, but now I am receiving the error below. All spaces and other potentially problematic characters have been removed. It crashes during the “LDA Effect Size” step. Any guidance would be much appreciated.

```auto
/galaxy_venv/local/lib/python2.7/site-packages/rpy2/rinterface/ __init__.py:185: RRuntimeWarning: Error in (function (file = "", n = NULL, text = NULL, prompt = "?", keep.source = getOption("keep.source"), : 
  <text>:1:71: unexpected input
1: z <- suppressWarnings(lda(as.formula(class ~ Flavonifractor_plautii + ^

  warnings.warn(x, RRuntimeWarning)
Traceback (most recent call last):
  File "/shed_tools/testtoolshed.g2.bx.psu.edu/repos/george-weingart/lefse/a6284ef17bf3/lefse/run_lefse.py", line 89, in <module>
    if params['rank_tec'] == 'lda': lda_res,lda_res_th = test_lda_r(cls,feats,class_sl,params['n_boots'],params['f_boots'],params['lda_abs_th'],0.0000000001,params['nlogs'])
  File "/export/shed_tools/testtoolshed.g2.bx.psu.edu/repos/george-weingart/lefse/a6284ef17bf3/lefse/lefse.py", line 189, in test_lda_r
    z = robjects.r('z <- suppressWarnings(lda(as.formula('+f+'),data=sub_d,tol='+str(tol_min)+'))')
  File "/galaxy_venv/local/lib/python2.7/site-packages/rpy2/robjects/ __init__.py", line 358, in __call__
    p = _rparse(text=StrSexpVector((string,)))
rpy2.rinterface.RRuntimeError: Error in (function (file = "", n = NULL, text = NULL, prompt = "?", keep.source = getOption("keep.source"), : 
  <text>:1:71: unexpected input
1: z <- suppressWarnings(lda(as.formula(class ~ Flavonifractor_plautii + _
                                                                          ^

```

_admin reformat_

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [March 25, 2019, 9:30pm UTC](https://help.galaxyproject.org/t/lefse-formatting-error/908/2 "2019-03-25T21:30:27Z")

</div>

Welcome, @rbrewster!

> [@rbrewster](#):
>
> unexpected input

This does look like an input formatting problem and not a tool problem.

Choices:

- You could confirm that the tool itself (including dependencies) is actually intact by rerunning the tool with data that previously ran through the tool successfully to see what happens.

- If that works, then try comparing your prior data input formats to the new data inputs. Headers, data lines, etc.

- If that doesn’t work for some reason, you might want to consider updating to a newer version of the tool. Galaxy has been updated since this tool was, there might be some incompatibility. The version you are using is from the Test ToolShed – and tools from this source are generally not recommended. There is a (presumably stable) version from this same community developer in the Main ToolShed [https://usegalaxy.org](https://usegalaxy.org) (warning: also several years old, so consider this carefully and test).

- If that new version from the MTS also presents problems, you could contact the tool wrapper author through the ToolShed (log in and see “Repository Actions”). They did not link in a development repository, so you can’t open/review tickets/known issues there, unfortunately.

- The IUC also has a recently updated version (inputs are reformatted `Mothur` outputs, if that would work for you). You’ll want to use the complete updated `Mothur` tool suite from the IUC if you decide to go this route – there were many updates in the last revision. Trying to combine older/newer tools and data will be problematic for several steps (that I’ve noticed).
