addMsMs.oldRMB: Add MS/MS Scans to Plot - Backwards Compatible to Older...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/EICandMSMS.R

Description

This adds MS/MS Scans to EIC plots (or others) using findMsMsHR.mass from RMassBank, compatible with pre 2.0.0 versions.

Usage

1
addMsMs.oldRMB(mzML_filePath, mz, rt, rt_window=NULL, maxCount=10, colour="black", isLog = FALSE)

Arguments

mzML_filePath

Path to the mzML (or mzXML) file to extract the EICs.

mz

mz value for MS/MS extraction.

rt

rt value for MS/MS extraction (seconds).

rt_window

RT window for extraction, as in plotEICs. If NULL, values are extracted over whole run.

maxCount

Maximum number of scans to extract, for findMsMsHR.mass.

colour

Colour of the lines to plot. Default black; ideally same colour as EIC.

isLog

Set whether log values should be plotted. Default FALSE - the setting TRUE is completely untested (as EIC log plotting also not working)!

Value

Returns lines for the plot in the active device. If this returns errors, try addMsMs. If this returns warnings, it is likely no MS/MS scans are present matching the given limits (the warnings should indicate if this is the case).

Author(s)

Emma Schymanski <emma.schymanski@uni.lu>, Michael Stravs <michael.stravs@eawag.ch>

See Also

findMsMsHR.mass, plotEICs, addMsMs.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(RMassBank)
library(RMassBankData)
RmbDefaultSettings()
mzML_files <- list.files(system.file("spectra", package="RMassBankData"), ".mzML", full.names = TRUE)
mzML_file <- mzML_files[1]
cmpd_id <- "2818"
loadList(system.file("list/NarcoticsDataset.csv",package="RMassBankData"))
smiles <- findSmiles(cmpd_id)
mz <- as.numeric(findMz(cmpd_id, mode="pH")[3])
rt <- as.numeric(findRt(cmpd_id))
plotEICs(mzML_file, mz, rt, rt_in_sec=FALSE, smiles = smiles)
plotEICs(mzML_file, mz, rt, rt_in_sec=FALSE, smiles = smiles, addMSMS=TRUE, newRMB=FALSE)

schymane/ReSOLUTION documentation built on May 22, 2021, 3:41 a.m.