compare_DA: Comparing the results of differential analysis methods by...

View source: R/DA-comparing.R

compare_DAR Documentation

Comparing the results of differential analysis methods by Empirical power and False Discovery Rate

Description

Calculating power, false discovery rates, false positive rates and auc ( area under the receiver operating characteristic (ROC) curve) for various DA methods.

Usage

compare_DA(
  ps,
  group,
  taxa_rank = "none",
  methods,
  args = list(),
  n_rep = 20,
  effect_size = 5,
  k = NULL,
  relative = TRUE,
  BPPARAM = BiocParallel::SnowParam(progressbar = TRUE)
)

Arguments

ps, group, taxa_rank

main arguments of all differential analysis methods. ps: a phyloseq::phyloseq object; group, character, the variable to set the group, must be one of the var of the sample metadata; taxa_rank: character, taxonomic rank, please not that since the abundance table is spiked in the lowest level, only taxa_rank = "none" is allowed.

methods

character vector, differential analysis methods to be compared, available methods are "aldex", "ancom", "ancombc", "deseq2", "edger", "lefse", "limma_voom", "metagenomeseq", "simple_stat".

args

named list, which used to set the extra arguments of the differential analysis methods, so the names must be contained in methods. For more see details below.

n_rep

integer, number of times to run the differential analyses.

effect_size

numeric, the effect size for the spike-ins. Default 5.

k

numeric vector of length 3, number of features to spike in each tertile (lower, mid, upper), e.g. k=c(5,10,15) means 5 features spiked in low abundance tertile, 10 features spiked in mid abundance tertile and 15 features spiked in high abundance tertile. Default NULL, which will spike 2 percent of the total amount of features in each tertile (a total of 6 percent), but minimum c(5,5,5).

relative

logical, whether rescale the total number of individuals observed for each sample to the original level after spike-in. Default TRUE.

BPPARAM

BiocParallel::BiocParallelParam instance defining the parallel back-end.

Details

To make this function support for different arguments for a certain DA method args allows list of list of list e.g. args = list(lefse = list(list(norm = "CPM"), list(norm = "TSS"))), which specify to compare the different norm arguments for lefse analysis.

For taxa_rank, only taxa_rank = "none" is supported, if this argument is not "none", it will be forced to "none" internally.

Value

an compareDA object, which contains a two-length list of:

  • metrics: data.frame, FPR, AUC and spike detection rate for each run.

  • mm: differential analysis results.


yiluheihei/microbiomeMarker documentation built on Nov. 5, 2023, 7:19 a.m.