detectBatchDiff: Detect batch/block differences

Description Usage Arguments Details Value Examples

Description

Detect batch/block differences within analytical runs for each ionisation mode.

Usage

1
2
3
4
5
6
7
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)

Arguments

x

object of class Binalysis or MetaboProfile

by

info class column to use for batch information

pthresh

p-value threshold for significance

Details

Analysis of Variance (ANOVA) is used to detect differences in total ion count (TIC) averages between batches/blocks.

Value

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.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Retrieve file paths and sample information for example data
files <- metaboData::filePaths('FIE-HRMS','BdistachyonEcotypes',ask = FALSE)[1:2]

info <- metaboData::runinfo('FIE-HRMS','BdistachyonEcotypes')[1:2,]

## Perform spectral binning
analysis <- binneR::binneRlyse(files, 
                               info, 
                               parameters = binneR::detectParameters(files))

## Detect batch differences
batch_diff <- detectBatchDiff(analysis)

## Display batch diffferences
batch_diff

jasenfinch/metaboMisc documentation built on Feb. 10, 2022, 4:22 p.m.