writeMS: writeMS

View source: R/Functions_SIRIUS.R

writeMSR Documentation

writeMS

Description

write an .ms file containing a spectrum to be exported to SIRIUS. will append additional spectrum to file if filename is that of an existing file.

Usage

writeMS(
  filename,
  ms2,
  ms1 = NULL,
  parentmz,
  comments = "",
  rt = "",
  ion = NULL,
  charge = 1,
  hashtag = NULL,
  scanindices = NULL
)

Arguments

filename

path of file to write to

ms2

a matrix with columns mz and intensity, or a list of ms2 spectra in the same format

ms1

a matrix with columns mz and intensity for a single MS1 spectrum

parentmz

numeric: parent ion m/z value

comments

character: comments

rt

numeric: retention time in seconds

ion

ion type (e.g. [M+H]+)

charge

charge (positive or negative integer)

hashtag

hash tag of the ms2 spectrum

scanindices

which scans were averaged into this ms2 spectrum

Value

Returns nothing, but writes a SIRIUS .ms file.


mjhelf/METABOseek documentation built on April 27, 2022, 5:13 p.m.