Lefser is metagenomic biomarker discovery tool that is based on
LEfSe tool and is published by
Huttenhower et al. 2011.
Lefser
is the R implementation of the LEfSe
method.
Using statistical analyses, lefser
compares microbial populations of healthy
and diseased subjects to discover differencially expressed microorganisms.
Lefser
than computes effect size, which estimates magnitude of differential
expression between the populations for each differentially expressed
microorganism. Subclasses of classes can also be assigned and used within the
analysis.
knitr::opts_chunk$set(fig.align = "center")
To install Bioconductor and the lefser
package, run the following
commands.
if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") BiocManager::install("lefser")
Then load the lefser
package.
library(lefser)
lefser
The lefser
function can be used with a SummarizedExperiment
.
Load the zeller14
example dataset and exclude 'adenoma' conditions.
data(zeller14) zeller14 <- zeller14[, zeller14$study_condition != "adenoma"]
Note. lefser
supports only two-group contrasts.
The colData
in the SummarizedExperiment
dataset contains the grouping
column study_condition
which includes the 'control' and 'CRC' groups.
table(zeller14$study_condition)
There can be subclasses in each group condition. In the example dataset
we include age_category
as a subclass of study_condition
which includes
'adults' and 'seniors'. This variable will correspond to the blockCol
input argument.
table(zeller14$age_category)
We can create a contingency table for the two categorical variables.
table(zeller14$age_category, zeller14$study_condition)
We can now use the lefser
function. It provides results as a data.frame
with the names of selected microorganisms and their effect size.
res <- lefser(zeller14, groupCol = "study_condition", blockCol = "age_category") head(res)
lefserPlot
lefserPlot(res)
sessionInfo()
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.