preTreatModes: Pre-treatment of multiple ionisation modes

preTreatModesR Documentation

Pre-treatment of multiple ionisation modes

Description

Pre-treat both positive and negative ionisation modes for Binalysis and MetaboProfile classes.

Usage

preTreatModes(processed_data, parameters, verbose = TRUE)

## S4 method for signature 'Binalysis'
preTreatModes(processed_data, parameters, verbose = TRUE)

## S4 method for signature 'MetaboProfile'
preTreatModes(processed_data, parameters, verbose = TRUE)

Arguments

processed_data

an object of S4 class Binalysis or MetaboProfile

parameters

an object of S4 class AnalysisParameters containing pre-treatment parameters

verbose

print console output

Value

An object of S4 class Analysis.

Examples

## Retrieve file paths and sample information for example data
files <- metaboData::filePaths('FIE-HRMS','BdistachyonEcotypes')[1:2]

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

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

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

## Dectect the pre-treatment parameters
pre_treatment_parameters <- detectPretreatmentParameters(analysis)
metabolyseR::changeParameter(pre_treatment_parameters,'parallel') <- 'no'

## Perform pre-treatment
pre_treated_data <- preTreatModes(analysis,
                                  pre_treatment_parameters)

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