BrukerTimsFile#
- class pyopenms.BrukerTimsFile(*args, **kwargs)#
Bases:
objectReader for Bruker TimsTOF .d directories via opentims.
Supports DDA-PASEF, DIA-PASEF, and raw frame-level 4D access. Ion mobility data is stored in VSSC (1/K0) units using IM_PEAK format for MS1 and DIA MS2, and scalar drift times for DDA MS2.
This class is only available when OpenMS is built with
WITH_OPENTIMS=ON(the default). The Bruker SDK (timsdata.dll/libtimsdata.so) is not bundled with pyOpenMS; supply it via theOPENMS_BRUKER_SDK_PATHenvironment variable orConfig.bruker_sdk_path.Use
hasattr(pyopenms, "BrukerTimsFile")to feature-detect at runtime.- __init__(self) None#
Attributes
Ends the progress display
Returns the type of progress log being used
Overloaded function.
Increment progress by 1 (according to range begin-end)
Overloaded function.
Sets the progress log that should be used.
Sets the current progress
- class Config(*args, **kwargs)#
Bases:
objectProcessing and export configuration for BrukerTimsFile.load() and readDIAMetadata()
- class TimsCalibrationStrategy(*values)#
Bases:
Enum- AUTO = 0#
- BRUKER_SDK = 1#
- LINEAR = 3#
- RATIONAL = 2#
- property bruker_sdk_path#
Path to Bruker SDK library (empty = discover from OPENMS_BRUKER_SDK_PATH env var)
- property calibrate#
Enable m/z recalibration (off by default; may fail on some datasets)
- property calibration_tolerance#
m/z recalibration tolerance in Da (0 = default 0.1 Da)
- property dia_ms2_centroid#
DIA MS2 2D peak picking: Gaussian smoothing + local maxima detection
- property dia_ms2_min_support#
DIA MS2 denoising: minimum occupied neighbors in 3x3 (m/z x IM) grid
- property dia_ms2_n_neighbors#
DIA MS2 frame aggregation: number of adjacent frames on each side (0 = disabled)
- property export_mode#
AUTO detects DDA vs DIA; SPECTRUM forces per-precursor; FRAME returns raw 4D frames
- property load_ms1#
Load MS1 spectra. Disable for MS2-only workflows.
- property ms1_centroid_im_pct#
MS1 IM-centroiding ion mobility tolerance in percent (0 = disabled, suggested: 3.0)
- property ms1_centroid_max_peaks#
Upper bound on centroided peaks per MS1 spectrum
- property ms1_centroid_mz_ppm#
MS1 IM-centroiding m/z tolerance in ppm (0 = disabled, suggested: 5.0)
- property ms1_max_rt_distance_sec#
Cap RT distance (s) between neighbor MS1 frame and center frame during aggregation (0 = no cap)
- property ms1_min_support#
MS1 denoising after aggregation: min occupied 3x3 neighbors (0 = disabled)
- property ms1_n_neighbors#
MS1 frame aggregation: adjacent MS1 frames on each side (0 = disabled)
- property ms2_centroid_algo#
MS2 centroiding algorithm for DIA-PASEF and DDA-PASEF
- property pressure_compensation#
Pressure compensation strategy (only effective with BRUKER_SDK calibration)
- property tims_calibration_strategy#
Strategy for converting TIMS scan indices to 1/K0 values
- class DIAStreamingMetadata(*args, **kwargs)#
Bases:
objectMetadata describing DIA SWATH layout for streaming consumers
- property boundaries#
One SwathMap per DIA window (MS2 only)
- property nr_ms1_spectra#
Number of MS1 frames
- property nr_ms2_spectra#
Per-window spectrum counts (parallel to boundaries)
- endProgress#
Ends the progress display
- getLogType#
Returns the type of progress log being used
- load#
Overloaded function.
load(self, path: str) -> pyopenms._pyopenms_experiment.MSExperiment
Load a .d directory into a new MSExperiment using default configuration
load(self, path: str, config: pyopenms._pyopenms_format.BrukerTimsFile.Config) -> pyopenms._pyopenms_experiment.MSExperiment
Load a .d directory into a new MSExperiment with explicit configuration
- nextProgress#
Increment progress by 1 (according to range begin-end)
- readDIAMetadata#
Overloaded function.
readDIAMetadata(self, path: str) -> tuple
Read DIA SWATH boundaries and spectrum counts (no peak data). Returns (DIAStreamingMetadata, ExperimentalSettings).
readDIAMetadata(self, path: str, config: pyopenms._pyopenms_format.BrukerTimsFile.Config) -> tuple
Read DIA SWATH boundaries and spectrum counts with explicit configuration. Returns (DIAStreamingMetadata, ExperimentalSettings).
- setLogType#
Sets the progress log that should be used. The default type is NONE!
- setProgress#
Sets the current progress
- startProgress#