peakpick

deimos.peakpick.local_maxima(features, dims=['mz', 'drift_time', 'retention_time'], bins=[37, 9, 37], scale_by=None, ref_res=None, scale=None)[source]

N-dimensional non-maximum suppression peak detection method.

Parameters:
  • features (DataFrame) – Input feature coordinates and intensities.

  • dims (str or list) – Dimensions to perform peak detection in (omitted dimensions will be collapsed and summed accross).

  • bins (float or list) – Number of bins representing approximate peak width in each dimension.

  • scale_by (str) – Dimension to scale bin widths by. Only applies when data is partitioned by scale_by (see deimos.utils.partition()).

  • ref_res (float) – Minimum acquisition resolution of scale_by dimension.

  • scale (str or list) – Dimensions to scale, according to scale_by.

Returns:

Coordinates of detected peaks and associated apex intensitites.

Return type:

DataFrame

deimos.peakpick.persistent_homology(features, index=None, factors=None, dims=['mz', 'drift_time', 'retention_time'], radius=None)[source]

Peak detection by persistent homology, implemented as a sparse upper star filtration.

Parameters:
  • features (DataFrame) – Input feature coordinates and intensities.

  • index (dict) – Index of features in original data array.

  • factors (dict) – Unique sorted values per dimension.

  • dims (str or list) – Dimensions to perform peak detection in.

  • radius (float, list, or None) – If specified, radius of the sparse weighted mean filter in each dimension. Values less than one indicate no connectivity in that dimension.

Returns:

Coordinates of detected peaks, associated apex intensitites, and persistence.

Return type:

DataFrame