compare: Difference comparison

View source: R/compare.R

compareR Documentation

Difference comparison

Description

Input feature table, group info and comparing pair Features with relative abundance, p-value and FDR for pair.

Usage

compare(
  data = otutab,
  metadata = metadata,
  group = "Group",
  compare_pair = "KO-WT",
  method = "wilcox",
  RA = 0.01,
  pvalue = 0.05,
  fdr = 0.1,
  normalize = T
)

Arguments

data

data matrix

metadata

matrix or dataframe, including sampleID and groupID;

group

column name for groupID.

compare_pair

paired groups linked with dash.

method

method of test.

RA

threshold for relative abundance.

pvalue

threshold of pvalue.

fdr

threshold of fdr.

normalize

data normalize to 100%, default T, turn off by F.

Details

By default, return table The available test methods include the following:

  • most used methods: wilcoxon test, t.test

  • other used indices: edgeR, DESeq2

Value

Difference comparison table.

Author(s)

Contact: Yong-Xin Liu metagenome@126.com

References

Yong-Xin Liu, Yuan Qin, Tong Chen, Meiping Lu, Xubo Qian, Xiaoxuan Guo & Yang Bai. A practical guide to amplicon and metagenomic analysis of microbiome data. Protein Cell, 2020(41), 1-16, DOI: https://doi.org/10.1007/s13238-020-00724-8

See Also

compare_vocalno compare_heatmap compare_manhattan

Examples

# Table, metadata, groupID, compare pair and method (wilcoxon test)
compare(data = otutab, metadata = metadata, group = "Group", compare_pair = "KO-WT", method = "wilcox")
# Filter by 0.01% relative abundance, Pvalue and FDR, not normalize
compare(data = otutab, metadata = metadata, group = "Group", compare_pair = "KO-WT", method = "wilcox", RA = 0.01, pvalue = 0.05, fdr = 0.1, normalize = F)

microbiota/amplicon documentation built on April 30, 2023, 1:48 p.m.