Lefse is an online program that was developed by the Huttenhower lab at Harvard. Briefly, Lefse performs biomarker discovery by taking in categorized relative abundance features, such as microbial relative abundances which are categorized as diseased or non-diseased, performs some statistical analyses, and determines which features are statistically significant between categories and are therefore potential biomarkers. This program is especially nice because it allows you to quickly visualize the biomarker potential of your dataset. Read more about it in their paper, which I included in the works cited.
Lefse is overall easy to use, except for the formatting of the input data. I definitely had a few issues when I was first trying to use the relative abundance tables I yielded after running some Qiime analyses. To make my life easier, I wrote up a python script to quickly change my Qiime alpha diversity tables to a format that Lefse will read. Additionally, to hopefully make some of the readers' lives easier, I am posting that script here and on GitHub. Either download it from my Github account (Qiime_to_lefse_format), or copy it from here, paste and save it into a file named transform_for_lefse.py, and run it as 'python transform_for_lefse.py'.
This is nothing too fancy, but it makes life easier. Basically it will take your relative abundance table straight from Qiime, make a few substitutions, and merge it with your mapping file (so your metadata is included in the Lefse input). All you have to do is make sure you remove the rows and columns you are not going to use in your Lefse analysis because it does not deal well with extra information. After this you should be ready to import your data table into Lefse.
As always, my goal is to provide you with some cool resources and further reading. If you want to work on this code, improve it, or whatever, find it on my Github at Qiime_to_lefse_format. If you want to chat about this stuff, ask questions, or whatever, please reach out and contact me. I am new to Python and learning, but I would love to learn from you or pass on what information I have. I know more about the biology and medicine, so I would love to talk about that too.
Nicola Segata, Jacques Izard, Levi Waldron, Dirk Gevers, Larisa Miropolsky, Wendy S Garrett, & Curtis Huttenhower (2011). Metagenomic biomarker discovery and explanation Genome Biol DOI: 10.1186/gb-2011-12-6-r60
*Code formatting: http://hilite.me/
*Stock photo from source