lefser: R implementation of the LEfSe method

Description Usage Arguments Value

View source: R/DA_LEfSe.R

Description

Perform a LEfSe analysis: the function carries out differential analysis between two sample groups for multiple microorganisms and uses linear discirminant analysis to establish their effect sizes. Subclass information for each class can be incorporated into the analysis (see examples). Microorganisms with large differences between two sample groups are identified as biomarkers.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
lefser(
  expr,
  kruskal.threshold = 0.05,
  wilcox.threshold = 0.05,
  lda.threshold = 2,
  groupCol = "GROUP",
  blockCol = NULL,
  assay = 1L,
  trim.names = FALSE
)

Arguments

expr

A SummarizedExperiment with expression data.

kruskal.threshold

numeric(1) The p-value for the Kruskal-Wallis Rank Sum Test (default 0.05).

wilcox.threshold

numeric(1) The p-value for the Wilcoxon Rank-Sum Test when 'blockCol' is present (default 0.05).

lda.threshold

numeric(1) The effect size threshold (default 2.0).

groupCol

character(1) Column name in 'colData(expr)' indicating groups, usually a factor with two levels (e.g., 'c("cases", "controls")'; default "GROUP").

blockCol

character(1) Optional column name in 'colData(expr)' indicating the blocks, usually a factor with two levels (e.g., 'c("adult", "senior")'; default NULL).

assay

The i-th assay matrix in the ‘SummarizedExperiment' (’expr'; default 1).

trim.names

If 'TRUE' extracts the most specific taxonomic rank of organism.

Value

The function returns a dataframe with two columns, which are names of microorganisms and their LDA scores.


HuaZou/MyRtools documentation built on Jan. 6, 2022, 8:56 a.m.