splitPolarities: Separate spectra with different polarities from the same run

Description Usage Arguments Value Examples

View source: R/accessory_functions.R

Description

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

Usage

1
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

1
2
3
4
5
6
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")

CluMSID documentation built on Nov. 8, 2020, 7:46 p.m.