# LefSe Error: Error in svd(X, nu = 0L) : infinite or missing values in 'x'

**URL:** <https://forum.biobakery.org/t/lefse-error-error-in-svd-x-nu-0l-infinite-or-missing-values-in-x/3896>\
**Category:** LEfSe\
**Created:** [July 29, 2022, 1:23pm UTC](https://forum.biobakery.org/t/lefse-error-error-in-svd-x-nu-0l-infinite-or-missing-values-in-x/3896 "2022-07-29T13:23:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nina](https://avatars.discourse-cdn.com/v4/letter/n/e68b1a/32.png) [@Nina](https://forum.biobakery.org/u/Nina)\
**Post date:** [July 29, 2022, 1:23pm UTC](https://forum.biobakery.org/t/lefse-error-error-in-svd-x-nu-0l-infinite-or-missing-values-in-x/3896/1 "2022-07-29T13:23:10Z")

</div>

Hello! I am new to LefSe and am attempting analysis of a small data set of 6 samples. There are two groups to compare (5 samples in one group, one in the other). Any help you can provide is greatly appreciated. Below is the error message I receive after step B.

/galaxy\_venv/local/lib/python2.7/site-packages/rpy2/rinterface/ **init**.py:185: RRuntimeWarning: Error in svd(X, nu = 0L) : infinite or missing values in ‘x’

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   
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 359, in **call**  
res = self.eval(p)  
File “/galaxy\_venv/local/lib/python2.7/site-packages/rpy2/robjects/functions.py”, line 178, in **call**  
return super(SignatureTranslatedFunction, self). **call** (\*args, \*\*kwargs)  
File “/galaxy\_venv/local/lib/python2.7/site-packages/rpy2/robjects/functions.py”, line 106, in **call**  
res = super(Function, self). **call** (\*new\_args, \*\*new\_kwargs)  
rpy2.rinterface.RRuntimeError: Error in svd(X, nu = 0L) : infinite or missing values in ‘x’

I was able to get this output: Number of significantly discriminative features: 17 ( 17 ) before internal wilcoxon.

Many thanks,

Nina

---

<div class="post-metadata">

**Author:** ![mishort](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/mishort/32/556_2.png) [@mishort](https://forum.biobakery.org/u/mishort)\
**Post date:** [August 19, 2022, 3:20pm UTC](https://forum.biobakery.org/t/lefse-error-error-in-svd-x-nu-0l-infinite-or-missing-values-in-x/3896/2 "2022-08-19T15:20:55Z")

</div>

Hi Nina,  
It looks like there may be some missing or non-numerical values in your data. If that’s not the case, or if you try removing those and still see an error, let me know and we can continue troubleshooting!  
Thanks,  
Meg

---

<div class="post-metadata">

**Author:** ![fabio-marcelo](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/fabio-marcelo/32/2333_2.png) [@fabio-marcelo](https://forum.biobakery.org/u/fabio-marcelo)\
**Post date:** [August 2, 2023, 1:17pm UTC](https://forum.biobakery.org/t/lefse-error-error-in-svd-x-nu-0l-infinite-or-missing-values-in-x/3896/3 "2023-08-02T13:17:19Z")

</div>

Hi Meg. I’ve got the same problem running lefse on R (lefser). I’ve checked: my data do not contain NA or rows or columns containing only zeros.  
Can you help me please!?

---

<div class="post-metadata">

**Author:** ![nearinj](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/nearinj/32/2135_2.png) [@nearinj](https://forum.biobakery.org/u/nearinj)\
**Post date:** [August 2, 2023, 5:05pm UTC](https://forum.biobakery.org/t/lefse-error-error-in-svd-x-nu-0l-infinite-or-missing-values-in-x/3896/4 "2023-08-02T17:05:26Z")

</div>

Hi Fabio,

I would try and run a simple test case through the galaxy server to see if you have malformed metadata as suggested early by Meg.

In terms of lefser I’m not sure what’s going on there but it might be best to post an issue on their GitHub repo or send them an email as I’m not sure how they implemented the tool.

Cheers,  
Jacob
