parses MGF files into a JSON. The spectrum can be delimited by ' ', '\t', ',' or ';'.

parse(rawData: string, options: object): array<object>
Parameters
rawData (string) input data (MGF)
options (object = {})
Name Description
options.recordTypes string (default '') allows to filter the data entries based on their type
options.sortX boolean (default false) should the MS spectrum be sorted by x values
options.uniqueX boolean (default false) should merge the repeating x values of MS spectrum (summing the y values together). Sets sortX to true if true.
options.normedY boolean (default false) should the MS spectrum be normalized (sum of y values = 1)
options.maxY number (default undefined) if not undefined, rescale MS spectrum so that max Y value equals maxY (must be bigger than 0)
Returns
array<object>: parsed data