fold_change: Fold change

Description Usage Arguments Value References Examples

View source: R/fold_change_class.R

Description

Fold change is the relative change in mean (or non-parametric equivalent) intensities of a feature between all pairs of levels in a factor.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
fold_change(
  alpha = 0.05,
  factor_name,
  paired = FALSE,
  sample_name = character(0),
  threshold = 2,
  control_group = character(0),
  method = "geometric",
  ...
)

Arguments

alpha

(numeric) The p-value cutoff for determining significance. The default is 0.05.

factor_name

(character) The name of a sample-meta column to use.

paired

(logical) Paired fold change. Allowed values are limited to the following:

  • "TRUE": Fold change is calculated taking into account paired sampling.

  • "FALSE": Fold change is calculated assuming there is no paired sampling.

The default is FALSE.

sample_name

(character) The name of a sample_meta column containing sample identifiers for paired sampling. The default is character(0).

threshold

(numeric) The fold change threshold for labelling features as significant. The default is 2.

control_group

(character) The level name of the group used in the denominator (where possible) when computing fold change. The default is character(0).

method

(character) Fold change method. Allowed values are limited to the following:

  • "geometric": A log transform and a t-test is used to calculate fold change and estimate confidence intervals. In the non-transformed space this is equivalent to fold change using geometric means.

  • "median": A log transform and the method described by Price and Bonett to calculate fold change and estimate confidence intervals. In the non-transformed space this is equivalent to using group medians to calculate fold change.

The default is "geometric".

...

Additional slots and values passed to struct_class.

Value

A fold_change object.

References

Price RM, Bonett DG (2002). “Distribution-Free Confidence Intervals for Difference and Ratio of Medians.” Journal of Statistical Computation and Simulation, 72(2), 119-124.

Examples

1
2
3
D = MTBLS79_DatasetExperiment()
M = fold_change(factor_name='class')
M = model_apply(M,D)

structToolbox documentation built on Nov. 8, 2020, 6:54 p.m.