FormatPeakList: Format Peak List

View source: R/Perform_functions.R

FormatPeakListR Documentation

Format Peak List

Description

This function formats the CAMERA output to a usable format for OptiLCMS.

Usage

FormatPeakList(
  mSet,
  annParams,
  filtIso = TRUE,
  filtAdducts = FALSE,
  missPercent = 0.75
)

Arguments

mSet

The mSet object generated by the PerformPeakAnnotation function.

annParams

The object created using the SetAnnotationParam function, containing user's specified or default parameters for downstream raw MS data pre-processing.

filtIso

Logical, filter out all isotopes except for ⁠[M]⁠+ for positive ion mode and ⁠[M]⁠- for negative ion mode. By default it is set to true.

filtAdducts

Logical, filter out all adducts except ⁠[M+H]⁠+ for positive ion more and ⁠[M-H]⁠- for negative ion mode. By default it is set to false.

missPercent

Numeric, specify the threshold to remove features missing in X\% of samples. For instance, 0.5 specifies to remove features that are missing from 50\% of all samples per group. Method is only valid when there are two groups.

Value

will return a mSet object with all result table formatted

Author(s)

Jasmine Chong jasmine.chong@mail.mcgill.ca, and Jeff Xia jeff.xia@mcgill.ca McGill University, Canada License: GNU GPL (>= 2)

See Also

ExecutePlan and PerformPeakProfiling for the whole pipeline.

Examples

data(mSet);
newPath <- dir(system.file("mzData", package = "mtbls2"),
               full.names = TRUE, recursive = TRUE)[c(10, 11, 12)]
mSet <- updateRawSpectraPath(mSet, newPath);
annParams <- SetAnnotationParam(polarity = 'positive',
                                mz_abs_add = 0.035);

## Perform peak annotation with newly deinfed annParams
# mSet <- PerformPeakAnnotation(mSet = mSet,
#                               annotaParam = annParams,
#                               ncore =1)
## Format the PeakList
mSet <- FormatPeakList(mSet = mSet,
                       annParams,
                       filtIso =FALSE,
                       filtAdducts = FALSE,
                       missPercent = 1)

xia-lab/OptiLCMS documentation built on March 27, 2024, 11:11 a.m.