splitPolarities: Separate spectra with different polarities from the same run

View source: R/accessory_functions.R

splitPolaritiesR Documentation

Separate spectra with different polarities from the same run

Description

Using splitPolarities, spectra with different polarities from the same run can be separated, e.g. when processing spectra recorded with polarity-switching.

Usage

splitPolarities(ms2list, polarity = c("positive", "negative"))

Arguments

ms2list

A list of MS2spectrum objects as produced by extractMS2spectra.

polarity

The polarity of spectra to be analysed, must be "positive" or "negative".

Value

A list of MS2spectrum objects that contains only spectra with the given polarity.

Examples

my_spectra <- extractMS2spectra(MSfile = system.file("extdata",
                                "PoolA_R_SE.mzXML",
                                package = "CluMSIDdata"),
                                min_peaks = 4, RTlims = c(0,5))

my_positive_spectra <- splitPolarities(my_spectra, "positive")


tdepke/CluMSID documentation built on April 10, 2022, noon