Skip to contents

Given a point-point spacing and a frequency range, create IRanges based regions of specified width. Overlapping sliding regions can be creating by specifying a region_size bigger than delta, adjacent tiled regions can be created by specifying a region_size == delta.

Usage

create_frequency_regions(
  point_spacing = 0.5,
  frequency_range = NULL,
  n_point = 10,
  delta_point = 1,
  multiplier = 500
)

Arguments

point_spacing

how far away are subsequent points.

frequency_range

the range of frequency to use

n_point

how many points you want to cover

delta_point

the step size between the beginning of each subsequent region

multiplier

multiplier to convert from frequency to integer space

Value

IRanges

Details

For Fourier-transform mass spec, points are equally spaced in frequency space, which will lead to unequal spacing in M/Z space. Therefore, we create regions using the point-point differences in frequency space.

What will be returned is an IRanges object, where the widths are constantly increasing over M/Z space.