detectBatchDiff | R Documentation |
Detect batch/block differences within analytical runs for each ionisation mode.
detectBatchDiff(x, by = "block", pthresh = 0.05)
## S4 method for signature 'Binalysis'
detectBatchDiff(x, by = "block", pthresh = 0.05)
## S4 method for signature 'MetaboProfile'
detectBatchDiff(x, by = "block", pthresh = 0.05)
x |
object of S4 class |
by |
info class column to use for batch/block information |
pthresh |
p-value threshold for significance |
Analysis of Variance (ANOVA) is used to detect differences in total ion count (TIC) averages between batches/blocks.
If no differences between batches are found then NULL
is returned. If significant differences are found then a tibble is returned containing the ANOVA results for each ionisation mode and showing whether batch correction is needed.
## Retrieve file paths and sample information for example data
files <- metaboData::filePaths('FIE-HRMS','BdistachyonEcotypes',ask = FALSE)
info <- metaboData::runinfo('FIE-HRMS','BdistachyonEcotypes')
## Perform spectral binning
analysis <- binneR::binneRlyse(files,
info,
parameters = binneR::detectParameters(files))
## Detect batch differences
batch_diff <- detectBatchDiff(analysis)
## Display batch differences
batch_diff
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.