Changing rooted tree tip lavels from IDs to taxonomy

Hello everyone,

I am currently trying to make lefse plot in R with the lefser Bioconductor package. However, I am having trouble making the package use ASVs instead of IDs. I have imported the relevant files (filtered-table.qza, rooted-tree.qza, taxonomy.qza and metadata.tsv) into a phyloseq object, followed by the next code. After unclassing all components from the phyloseq object and turning them into a SummarizedExperiment object, running Lefse with default settings and plotting the result, I get this.

Which is a mess. It seems lefser is comparing feature IDs between the categorical levels of the variable I am interested in (Sample type in this case) instead of a taxonomy table with all IDs properly assigned to their correct taxonomy, despite the fact that I am providing a taxonomy file with rowData when creating my SummarizedExperiment object. Can anyone let me know how I can fix this issue? I suppose I could try and going back to QIIME2 and providing the rooted-tree.qza file with the taxonomy labels or something else?

Thanks!

I haven't used this wrapper, but my hunch would be to try qiime taxa collapse on the feature-table to just bake the taxonomy into your feature-table. It won't be ASVs anymore, but maybe that isn't a concern for you?

I don't think lefse needs the phylogeny, but I may be wrong on that, or perhaps the R wrapper would need it indirectly. In which case, collapse won't help all that much.

Hi @PabloCL,

This seems like a formatting issue... If you'd like to obtain a traditional taxonomy style output from LEfSe (as intended, where different ranks are shown), you might follow the easy approach outlined here. Then feed the output into LEfSe...

If you are trying to obtain LEfSe cladogram output, there is no phylogeny required. That cladogram is simply a hierarchical taxonomic cladogram, not a phylogenetic cladogram.