Skip to contents

Given a data.frame of m/z, generate frequency values for the data.

Usage

convert_mz_frequency(mz_data, keep_all = TRUE)

Arguments

mz_data

a data.frame with mz

keep_all

keep all the variables generated, or just the original + frequency?

Value

list

Details

The M/Z values from FTMS data do not have constant spacing between them. This produces challenges in working with ranged intervals and windows. The solution for FTMS data then is to convert them to frequency space. This is done by:

  • taking subsequent M/Z points

  • averaging their M/Z

  • taking the difference to get an offset value

  • dividing averaged M/Z by offset to generate frequency

  • taking subsequent differences of frequency points

  • keep points with a difference in the supplied range as valid for modeling

After deciding on the valid points for modeling, each point gets an interpolated frequency value using the two averaged points to the left and right in M/Z.

See also

mz_scans_to_frequency