4.1 Introduction

4.1.1 Workflow functions

Each step in the non-target workflow is performed by a function that performs the heavy lifting of a workflow step behind the scenes and finally return the results. An important goal of patRoon is to support multiple algorithms for each workflow step, hence, when such a function is called you have to specify which algorithm you want to use. The available algorithms and their characteristics will be discussed in the next sections. An overview of all functions involved in generating workflow data is shown in the table below.

Workflow step Function Output S4 class
Data pre-treatment convertMSFiles(), recalibrarateDAFiles() -
Finding features findFeatures() features
Grouping features groupFeatures() featureGroups
Suspect screening screenSuspects() featureGroupsScreening
Componentization generateComponents() components
MS peak lists generateMSPeakLists() MSPeakLists
Formula annotation generateFormulas() formulas
Compound annotation generateCompounds() compounds

4.1.2 Workflow output

The output of each workflow step is stored in objects derived from so called S4 classes. Knowing the details about the S4 class system of R is generally not important when using patRoon (and well written resources are available if you want to know more). In brief, usage of this class system allows a general data format that is used irrespective of the algorithm that was used to generate the data. For instance, when features have been found by OpenMS or XCMS they both return the same data format.

Another advantage of the S4 class system is the usage of so called generic functions. To put simply: a generic function performs a certain task for different types of data objects. A good example is the plotSpectrum() function which plots an (annotated) spectrum from data of MS peak lists or from formula or compound annotation:

# mslists, formulas, compounds contain results for MS peak lists and
# formula/compound annotations, respectively.

plotSpectrum(mslists, ...) # plot raw MS spectrum
plotSpectrum(formulas, ...) # plot annotated spectrum from formula annotation data
plotSpectrum(compounds, ...) # likewise but for compound annotation.

4.1.3 Overview of all functions and their output

workflow cluster_suspAnn cluster_fGroups cluster_tps cluster_MSPL cluster_form cluster_comp cluster_compon Suspect list Suspect list screenSuspects screenSuspects() Suspect list->screenSuspects featureGroupsScreening featureGroupsScreening screenSuspects->featureGroupsScreening annotateSuspects annotateSuspects() featureGroupsScreening->annotateSuspects annotateSuspects->featureGroupsScreening Raw MS data Raw MS data Analysis information Analysis information Raw MS data->Analysis information findFeatures findFeatures() Analysis information->findFeatures features features findFeatures->features groupFeatures groupFeatures() features->groupFeatures featureGroups featureGroups groupFeatures->featureGroups featureGroups->screenSuspects generateMSPeakLists generateMSPeakLists() featureGroups->generateMSPeakLists generateFormulas generateFormulas() featureGroups->generateFormulas generateCompounds generateCompounds() featureGroups->generateCompounds generateComponents generateComponents() featureGroups->generateComponents generateAnalysisInfo generateAnalysisInfo() generateAnalysisInfo->Analysis information Parents Parents generateTPs generateTPs() Parents->generateTPs transformationProducts transformationProducts generateTPs->transformationProducts convertToSuspects convertToSuspects() transformationProducts->convertToSuspects convertToMFDB convertToMFDB() transformationProducts->convertToMFDB transformationProducts->generateComponents convertToSuspects->Suspect list database database convertToMFDB->database database->generateCompounds MSPeakLists MSPeakLists generateMSPeakLists->MSPeakLists MSPeakLists->annotateSuspects MSPeakLists->generateFormulas MSPeakLists->generateCompounds formulas formulas generateFormulas->formulas formulas->annotateSuspects addFormulaScoring addFormulaScoring() formulas->addFormulaScoring compounds compounds generateCompounds->compounds compounds->annotateSuspects compounds->addFormulaScoring components components generateComponents->components selectIons selectIons() components->selectIons selectIons->featureGroups addFormulaScoring->compounds

Figure 4.1: Workflow functions and output classes.

The next sections in this chapter will further detail on how to actually perform the non-target workflow steps to generate data. The transformation product screening workflows are discussed in a separate chapter.