ko.test: Differential analysis or Correlation analysis for...

View source: R/calculation.R

ko.testR Documentation

Differential analysis or Correlation analysis for KO-abundance table

Description

Differential analysis or Correlation analysis for KO-abundance table

Usage

ko.test(
  kodf,
  group,
  metadata = NULL,
  method = "wilcox.test",
  pattern = NULL,
  p.adjust.method1 = "none",
  threads = 1,
  verbose = TRUE
)

Arguments

kodf

KO_abundance table, rowname are feature ids (e.g. K00001 if feature="ko"; PEX11A if feature="gene"; C00024 if feature="compound"), colnames are samples.

group

The comparison groups (at least two categories) in your data, one column name of metadata when metadata exist or a vector whose length equal to columns number of kodf. And you can use factor levels to change order.

metadata

sample information data.frame contains group

method

the type of test. Default is 'wilcox.test'. Allowed values include:

  • t.test (parametric) and wilcox.test (non-parametric). Perform comparison between two groups of samples. If the grouping variable contains more than two levels, then a pairwise comparison is performed.

  • anova (parametric) and kruskal.test (non-parametric). Perform one-way ANOVA test comparing multiple groups.

  • 'pearson', 'kendall', or 'spearman' (correlation), see cor.

pattern

a named vector matching the group, e.g. c('G1'=1,'G2'=3,'G3'=2), use the correlation analysis with specific pattern to calculate p-value.

p.adjust.method1

p.adjust.method for 'ko.test', see p.adjust

threads

default 1

verbose

logical

Value

ko_pvalue data.frame

See Also

Other GRSA: combine_rs_res(), get_reporter_score(), pvalue2zs(), reporter_score()

Examples


data("KO_abundance_test")
ko_pvalue <- ko.test(KO_abundance, "Group", metadata)


ReporterScore documentation built on June 25, 2024, 9:06 a.m.