Lefse after QIIME2

@Clara

Prepare Qiime2 files for LEfSe:

collapse the table.gza to the L6 level

qiime taxa collapse
--i-table table.qza
--o-collapsed-table collapse.table.qza
--p-level 6
--i-taxonomy taxonomy.qza

calculate relative-frequency for the collapsed table (instead of counts you get relative abundance)

qiime feature-table relative-frequency
--i-table collapse.table.qza
--o-relative-frequency-table collapse.frequency.table.qza \
--output-dir collapse.frequency/

export biom file

qiime tools export
collapse.frequency.table.qza
--output-dir collapse.frequency/

convert biom to text file (for lefse comparison) QIIME1.9.1 command

biom convert \
-i collapse.frequency.table.biom
-o collapse.frequency.table.txt
--header-key "taxonomy" --to-tsv

You will need to format the text file for LEfSe. Meaning depending on if you have class or subclasses you will have to add 2-3 rows to the top of the file. Row 1 needs to be your class, Row 2 needs to be your subclass, and Row 3 will be your All ";" throughout the taxonomy will have to be changed to "|".

I hope that helps.

17 Likes