filter_ambient_ttest: Filter on significant differences from controls

View source: R/filter_ambient_ttest.R

filter_ambient_ttestR Documentation

Filter on significant differences from controls

Description

This function allows you to filter compounds based on whether the quantity of a compound in ambient or blank samples vs. floral samples is significantly different. It creates a filter_ambient_ttest column with the following values: OK (passed t-test), tTestFail (did not pass t-test), tTestZeros (cannot run t-test, data are all zeros), tTestSmallN (nonzero data but t-test returned NA or NaN). The (adjusted) p-value is added in the ambient_pvalue column.

Usage

filter_ambient_ttest(
  chemtable,
  sampletable,
  metadata,
  alpha,
  adjust = "none",
  compare = "ambient"
)

Arguments

chemtable

the data frame of the data about the compounds

sampletable

the wide data frame with samples in rows and compound names in columns, containing peak areas

metadata

the data frame that contains meta data about the group, type, and other attributes of each sample

alpha

maximum acceptable p-value, defaults to 0.05

adjust

"fdr" for False Discovery Rate correction, "none" for no correction, or any other method of p.adjust

compare

the type of sample to compare against - ambient or blank

Examples

filter_ambient_ttest(chemtable,sampletable,metadata,0.05)

jmpowers/bouquet documentation built on Feb. 12, 2023, 12:11 a.m.