purityA {msPurity}R Documentation

Assess the purity of multiple LC-MS/MS or DI-MS/MS files (constructor)

Description

Constructor for the purityA class.

Given a vector of LC-MS/MS or DI-MS/MS mzML file paths calculate the precursor purity of each MS/MS scan

Will automatically determine the isolation widths offsets from the mzML file. For some vendors though this is not recorded (Agilent). In these cases the offsets should be given as a parameter.

In the case of Agilent only the "narrow" isolation is supported. This roughly equates to +/- 0.65 Da (depending on the instrument). If the file is detected as originating from an Agilent instrument the isolation widths will automatically be set as +/- 0.65 Da.

Usage

purityA(fileList, cores = 1, mostIntense = FALSE, nearest = TRUE,
  offsets = NA, plotP = FALSE, plotdir = NULL, interpol = "linear",
  iwNorm = FALSE, iwNormFun = NULL, ilim = 0.05, mzRback = "pwiz",
  isotopes = TRUE, im = NULL)

Arguments

fileList

vector; mzML file paths for MS/MS spectra

cores

numeric; Number of cores to use

mostIntense

boolean; True if the most intense peak is used for calculation. False if the centered peak is used

nearest

boolean; True if the peak selected is from either the preceding scan or the nearest.

offsets

vector; Overide the isolation offsets found in the mzML filee.g. c(0.5, 0.5)

plotP

boolean; If TRUE a plot of the purity is to be saved

plotdir

vector; If plotP is TRUE plots will be saved to this directory

interpol

character; type of interolation to be performed "linear" or "spline" (Spline option is only included for testing purposes, linear should be used for all standard cases, isotope removal is also not available for the spline option)

iwNorm

boolean; If TRUE then the intensity of the isolation window will be normalised based on the iwNormFun function

iwNormFun

function; A function to normalise the isolation window intensity. The default function is very generalised and just accounts for edge effects

ilim

numeric; All peaks less than this percentage of the target peak will be removed from the purity calculation, default is 5% (0.05)

mzRback

character; backend to use for mzR parsing

isotopes

boolean; TRUE if isotopes are to be removed

im

matrix; Isotope matrix, default removes C13 isotopes (single, double and triple bonds)

Value

a dataframe of the purity score of the ms/ms spectra

See Also

assessPuritySingle

Examples

filepths <- system.file("extdata", "lcms", "mzML", "LCMSMS_1.mzML", package="msPurityData")
pa <- purityA(filepths)

[Package msPurity version 1.8.1 Index]