detectPretreatmentParameters: Detect pre-treatment parameters

detectPretreatmentParametersR Documentation

Detect pre-treatment parameters

Description

Detect suitable pre-treatment parameters for Binalysis or MetaboProfile class objects.

Usage

detectPretreatmentParameters(
  x,
  cls = "class",
  QCidx = "QC",
  miss_injections = TRUE,
  batch_correction = TRUE,
  threshold = 25
)

## S4 method for signature 'Binalysis'
detectPretreatmentParameters(
  x,
  cls = "class",
  QCidx = "QC",
  miss_injections = TRUE,
  batch_correction = TRUE,
  threshold = 25
)

## S4 method for signature 'MetaboProfile'
detectPretreatmentParameters(
  x,
  cls = "class",
  QCidx = "QC",
  miss_injections = TRUE,
  batch_correction = TRUE,
  threshold = 25
)

Arguments

x

S4 object of class Binalysis, MetaboProfile or AnalysisData

cls

the name of the sample information table column containing the sample class information

QCidx

QC sample class label

miss_injections

TRUE/FALSE. Detect the presence of possible miss injections and include parameters to remove these if necessary.

batch_correction

TRUE/FALSE. Detect if a batch correction is necessary and include parameters to perform this if necessary.

threshold

the percentage of the median TIC below which samples will be considered miss injections. This will be ignored if miss_injections = FALSE.

Value

An object of S4 class AnalysisParameters

Examples

## Retreive example file paths and sample information 
file_paths <- metaboData::filePaths('FIE-HRMS','BdistachyonEcotypes') 

sample_information <- metaboData::runinfo('FIE-HRMS','BdistachyonEcotypes') 

## Detect spectral binning parameters
bp <- binneR::detectParameters(file_paths)

## Perform spectral binning
bd <- binneR::binneRlyse(file_paths,sample_information,bp)

## Detect pre-treatment parameters
pp <- detectPretreatmentParameters(bd) 

pp

jasenfinch/metaboMisc documentation built on July 31, 2023, 2:28 a.m.