romicsWilcoxTest: romicsWilcoxTest()

View source: R/09_Statistics.R

romicsWilcoxTestR Documentation

romicsWilcoxTest()

Description

Performs all possible paired Wilcoxon signed-rank test for each variable using the levels of the selected factor of the romics_object. The results are added as new columns in the statistics layers.

Usage

romicsWilcoxTest(
  romics_object,
  alternative = "two.sided",
  paired = FALSE,
  pairing_factor = "none",
  factor = "main",
  padj = TRUE,
  padj_method = "BH",
  mode = "vs",
  ...
)

Arguments

romics_object

has to be an romics_object created with the function romicsCreateObject(),

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter.

paired

a logical indicating whether you want a paired t-test.

pairing_factor

name of a factor contained in an r_object, the list of the available factor can be obtained by using the function romics_factors()

factor

a character string indicating the factor to use for the test, the list of the available factor can be obtained by using the function romics_factors(), if missing the function will use the main factor of the object

padj

a logical variable indincating wheter to perform or not adjustment of pvalues

padj_method

correction method. Must be in "holm", "hochberg", "hommel", "bonferroni", "BH", "BY", "fdr","none"

mode

'vs' or 'enrichment' indicating if all the between group comparisons should be performed (vs) or if the features in a given group should be compared to all the other groups (enrichment).

...

other parameters can be passed down to the wilox.test() function from the 'stat' package.

Details

When paired Wilcox.test are performed it is possible to include a second factor to generate the pairs. This function will also calculate the fold-changes or log2(fold-change). Please, note that the test will automatically determine if a log tranformation was performed to the object, subsequently we recommend to import not pre-logged data.frames when creating the object. For paired T.tests, it is possible to set a second factor containing the pairs, if missing the function will consider the pairs based on the column order in the romics_object.

Value

an romics_object with the statistical layer containing the newly generated t.tests and fold-changes

Author(s)

Geremy Clair


PNNL-Comp-Mass-Spec/RomicsProcessor documentation built on March 18, 2023, 5:14 a.m.