Entering edit mode
                    6.4 years ago
        MatthewP
        
    
        ★
    
    1.4k
    Hello, I need to run LEFSe after Qiime2 pipeline. 
First I do follow steps to export relative frequency data and convert file format. 
Get genus(level 6 of silver) ralativate frequency and convert file format.
# extract level 6 data
qiime taxa collapse \
--i-table table-dada2.qza \
--i-taxonomy taxonomy/taxonomy.qza \
--p-level 6 \
--o-collapsed-table table-level6.qza
# get relative frequency data
qiime feature-table relative-frequency \
--i-table table-level6.qza \
--o-relative-frequency-table frequency-table-level6.qza \
--output-dir aollapse.ferquency/
# export data
qiime tools export \
--input-path frequency-table-level6.qza \
--output-path aollapse.ferquency/
# convert to tsv
biom convert \
-i aollapse.ferquency/feature-table.biom \
-o LEfSe/frequency-table.txt \
--header-key "taxonomy" \
--to-tsv
# Last, modify frequency-table.txt by adding 2 rows of class and sub class.
Then, run LEFSe pipeline.  
# convert file format
format_input.py frequency-table.txt frequency-table.in -c 1 -s 2 -u 3
# run analysis
run_lefse.py frequency-table.in frequency-table.res
Here rise an error, message:
Traceback (most recent call last):
  File "/home/linuxbrew/.linuxbrew/Cellar/lefse/1.0.0-dev-e3cabe9/libexec/bin/run_lefse.py", line 89, in 
<module>
    if params['rank_tec'] == 'lda': lda_res,lda_res_th = 
...
...
  File "/home/linuxbrew/.linuxbrew/Cellar/lefse/1.0.0-dev-e3cabe9/libexec/lib/python2.7/site- 
packages/rpy2/robjects/functions.py", line 178, in __call__
     return super(SignatureTranslatedFunction, self).__call__(*args, **kwargs)
   File "/home/linuxbrew/.linuxbrew/Cellar/lefse/1.0.0-dev-e3cabe9/libexec/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'
May this error caused by many 0 in relative frequency data. A few lines and columns in frequency-table.txt
D_4__Methanobacteriaceae|D_5__Methanobacterium     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     
0.0     0.0     0.0     0.0     
D_4__Methanobacteriaceae|D_5__Methanobrevibacter   0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     
0.008139322467371668    0.01874744774845
D_4__Methanobacteriaceae|D_5__Methanosphaera       0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     
0.0     0.0     0.0     0.0     
4__Actinomycetaceae|D_5__Actinomyces       0.0005721291377196567   0.0     0.0007087024491922876   
0.0006946052326927529   0.0     7.919537499010058e-05   
D_4__Bifidobacteriaceae|D_5__Bifidobacterium       0.11437133905462471     0.013930213686773059    
0.015591453882230329    0.0026791916118149043   0.002685
_Micrococcaceae|D_5__Rothia        0.0     4.50815976918222e-05    0.0004377279833246483   
0.0003638408361723944   0.000616959117385545    0.0     0.000313
_4__Atopobiaceae|D_5__Atopobium    0.0     0.0     0.00014590932777488276  0.0     0.0     0.0     0.0     0.0     
0.0     0.0     0.0     0.0     0.0     
_4__Atopobiaceae|D_5__Olsenella    0.00010897697861326794  0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     
0.0014849463563128783   0.0     
_4__Atopobiaceae|D_5__uncultured   0.0     0.0     0.0     0.0     0.0     0.0     0.0     0.0     6.089268678831672e-05   
0.00014849463563128783  0.0     
_4__Coriobacteriaceae|D_5__Collinsella     0.0     0.0     0.03034914017717561     0.009856779016306685    
0.016621604456622332    0.010077611467490298
How to solve such problem, thanks! Its there any other tools can do the same analyse like LEFSe ?
Hello, I learned a lot about
ANCOMafter this post. I thinkANCOMmaybe a better choice to compare between groups, except the plot output is not beauty.