sendToMSF: Exporting spectra to MSFinder.

View source: R/sendToMSF.r

sendToMSFR Documentation

Exporting spectra to MSFinder.

Description

Send spectrum to MSFinder.

Usage

sendToMSF(x, ...)

## Default S3 method:
sendToMSF(
  x,
  precursormz,
  precursortype = "[M+H]+",
  outfile = NULL,
  MSFexe = NULL,
  ...
)

## S3 method for class 'findMAIN'
sendToMSF(x, rank = 1, ms2spec = NULL, outfile = NULL, MSFexe = NULL, ...)

Arguments

x

A matrix or 'findMAIN' object

...

Arguments passed to methods of writeMSF.

precursormz

m/z of (de)protonated molecule or adduct ion

precursortype

adduct type, e.g. [M+H]+ or [M+Na]+. Accepted values are all adduct ions supported by MSFINDER.

outfile

Name of MAT file. If NULL, a temporary file is created in the per-session temporary directory (see tempdir).

MSFexe

Full path of MS-FINDER executable. This needs to be set according to your system. If NULL, MAT files are written but the program is not opened.

rank

Which rank from 'findMAIN' should be exported.

ms2spec

An (optional) MS2 spectrum to be passed to MSFINDER. If NULL, the MS1 spectrum used by 'findMAIN' is used. If dedicated MS2 spectra are available, this option should be used.

Details

In the default case 'x' can be a matrix or data frame, where the first two columns are assumed to contain the 'mz' and 'intensity' values, respectively. Further arguments 'precursormz' and 'precursortype' are required in this case. Otherwise 'x' can be of class findMAIN.

Value

Full path of generated MAT file (invisibly).

References

H.Tsugawa et al (2016) Hydrogen rearrangement rules: computational MS/MS fragmentation and structure elucidation using MS-FINDER software. Analytical Chemistry, 88, 7946-7958

Examples

## Not run: 
utils::data(esi_spectrum, package = "InterpretMSSpectrum")
fmr <- findMAIN(esi_spectrum)
sendToMSF(fmr, outfile="tmp.mat")
sendToMSF(fmr, outfile="tmp.mat", rank=1:3)

## End(Not run)


InterpretMSSpectrum documentation built on July 9, 2023, 5:58 p.m.