dimsPredictPuritySingle: Predict the precursor purity from a DI-MS dataset

Description Usage Arguments Value Examples

View source: R/purityD-dims-purity.R

Description

Given a an DI-MS dataset (either mzML or .csv file) calculate the predicted purity for a vector of mz values.

Calculated at a given offset e.g. for 0.5 +/- Da the minOffset would be 0.5 and the maxOffset of 0.5.

A ppm tolerance is used to find the target mz value in each scan.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
dimsPredictPuritySingle(
  mztargets,
  filepth,
  minOffset = 0.5,
  maxOffset = 0.5,
  ppm = 2.5,
  mzML = TRUE,
  iwNorm = FALSE,
  iwNormFun = NULL,
  ilim = 0.05,
  mzRback = "pwiz",
  isotopes = TRUE,
  im = NULL,
  sim = FALSE
)

Arguments

mztargets

vector = mz targets to get predicted purity for

filepth

character = mzML file path or .csv file path

minOffset

numeric = isolation window minimum offset

maxOffset

numeric = isolation window maximum offset

ppm

numeric = tolerance for target mz value in each scan

mzML

boolean = Whether an mzML file is to be used or .csv file (TRUE == mzML)

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)

sim

boolean = TRUE if file is from sim stitch experiment. Default FALSE

Value

a dataframe of the target mz values and the predicted purity score

Examples

1
2
3
4
mzmlPth <- system.file("extdata", "dims", "mzML", "B02_Daph_TEST_pos.mzML",
                       package="msPurityData")
predicted <- dimsPredictPuritySingle(c(173.0806, 216.1045), filepth=mzmlPth,
                             minOffset=0.5, maxOffset=0.5, ppm=5, mzML=TRUE)

msPurity documentation built on Jan. 14, 2021, 2:44 a.m.