Skip to contents
  • Internal Function *

Usage

check_MS_data_order(spec = NULL, spec_metadata = NULL)

Arguments

spec

a data frame containing the extracted MS/MS spectra, the following columns are required:

mz_precursor
rt
mz
intensity
spec_metadata

a data frame containing the values to be including in the resulting .msp file. The following columns are required as vital information for the .msp output.

NAME
PRECURSORTYPE
FORMULA
RETENTIONTIME
IONMODE
COLLISIONENERGY

Details

This function is intended to check the order of the key of the spec data and the spec metadata. If both keys are aligned, the code continues. If the keys are not aligned, it aborts. This function will not try to align the keys, as the the keys are ordered back-end and key alignment is expected.

Checks in this function include:

  • Check equal number of MS/MS data and number of observations in spec_metadata

  • All key names are aligned