OpenMS
Loading...
Searching...
No Matches
PASEFHillCentroider.h File Reference
#include <OpenMS/config.h>
#include <OpenMS/CONCEPT/Types.h>
#include <cstddef>
#include <cstdint>
#include <vector>
Include dependency graph for PASEFHillCentroider.h:

Go to the source code of this file.

Classes

struct  Params
 
struct  Centroid
 One centroided peak produced by hill detection. More...
 

Namespaces

namespace  OpenMS
 Main OpenMS namespace.
 
namespace  OpenMS::Internal
 Namespace used to hide implementation details from users.
 
namespace  OpenMS::Internal::PASEFHillCentroider
 

Functions

std::vector< CentroidcentroidFrame (const double *mz_values, const double *intensities, const double *im_values, std::size_t n, const Params &p, const std::uint32_t *scan_indices=nullptr)
 

Class Documentation

◆ OpenMS::Internal::PASEFHillCentroider::Params

struct OpenMS::Internal::PASEFHillCentroider::Params

Parameters for IM-axis hill-based centroiding of one TIMS-PASEF frame. Algorithm modeled on Biosaur2 (linkScanToHills_/splitHills_) but with IM scans within a frame playing the role of consecutive RT spectra.

Collaboration diagram for Params:
[legend]
Class Members
double im_group_tolerance = 0.0

Tolerance for treating two flat-input IM values as belonging to the same IM scan. 0.0 means exact equality. TIMS calibration produces discrete IM values per scan index, so exact equality usually works; callers that have float-cast their IM values may want a small epsilon.

Size max_scan_gap = 0

Maximum number of consecutive empty IM scans a hill is allowed to bridge while linking. 0 (default) = strict consecutive-scan linking (original Biosaur2 behavior). 1 = a single empty scan at the hill's m/z is tolerated; the hill's tail stays "alive" for one extra scan and can still be extended at scan+2. Useful for detector-centroided TIMS-PASEF where ions occasionally fail to register in one IM scan. Note: hill length counts only the scans where the ion was actually observed, not the bridged gap.

REQUIRES scan_indices to be passed to centroidFrame(). Without it the helper cannot tell which IM scans are empty (vs. simply absent from the input), and silently treats this as 0 to avoid merging hills across unknown gaps.

Size min_hill_length = 1

Minimum peaks per hill. Hills shorter than this are dropped.

Default 1 is appropriate for TIMS-PASEF data: detector centroiding produces sparse per-scan peaks, and many real ions span only one IM scan in a frame. Empirically, on detector-centroided MS1 frames roughly 75% of peaks have no same-m/z partner in the previous IM scan within 100 ppm — the data is genuinely sparse along the IM axis, not noisy. Raising to 2 (or higher) is appropriate when the caller knows multi-scan hills are typical (e.g. RT-axis hill detection on dense LC-MS data, the original Biosaur2 use case).

double min_intensity = 0.0 Discard input peaks below this intensity before linking.
double mz_tol_ppm = 8.0

m/z linking tolerance in ppm. A peak in the next IM scan extends a hill if its m/z is within this tolerance of the previous-scan peak.

double valley_factor = 1.3

Hill-valley factor (hvf): both (left_max / valley) and (right_max / valley) must exceed this for a valley to split a hill. Smaller values split more aggressively. Biosaur2 default = 1.3.

◆ OpenMS::Internal::PASEFHillCentroider::Centroid

struct OpenMS::Internal::PASEFHillCentroider::Centroid

One centroided peak produced by hill detection.

Collaboration diagram for Centroid:
[legend]
Class Members
double im_apex IM value at the hill's intensity apex.
double im_lower minimum IM value covered by the hill
double im_upper maximum IM value covered by the hill
double intensity summed intensity across the hill
Size length number of IM scans contributing to the hill
double mz intensity-weighted m/z over the hill
double mz_lower minimum m/z value covered by the hill
double mz_upper maximum m/z value covered by the hill