Python package to detect and correct oscillatory artifacts in mass spectrometry mzML data.
Project description
Oscillations_Corrector_Algorithm_SICRIT
Suppressing Signal Artifacts in CE-SICRIT-MS via Oscillation Processing
This repository contains a Python tool to detect and correct oscillations that appear in mass spectrometry (MS) spectra acquired with the SICRIT ionization source. The program reads .mzXML or .mzML files, identifies oscillatory m/z signals via FFT analysis, corrects their intensities, and outputs cleaned .mzML files.
The tool includes a command-line interface (CLI) to process single files or whole folders.
Table of Contents
Introduction
This Python module provides a pipeline for correcting oscillatory artifacts in CE-SICRIT-MS spectra.
It includes:
- Automatic loading of
.mzMLand.mzXMLfiles. - Conversion of
.mzXMLto.mzMLusing ProteoWizard MSConvert. - Detection of oscillatory m/z values using FFT-based power analysis.
- Correction of intensity oscillations via residual signal reconstruction.
- Saving corrected spectra in
.mzMLformat.
Installation
Clone the repository and install dependencies inside a conda environment:
git clone https://github.com/ceu-biolab/Oscillations_Corrector_Algorithm_SICRIT.git
cd Oscillations_Corrector_Algorithm_SICRIT
conda create -n sicritfix python=3.12
conda activate sicritfix
pip install -e .
Usage
You can run the program from the command line after installation.
Both single files and folders are supported.
Processing a Single File
Run the tool with an input file:
python sicritfix.py input_file.mzXML --output corrected.mzML --overwrite
If no --output is provided, the tool will automatically generate a filename by appending _corrected.mzML.
Processing a Folder of Files
To process an entire folder of .mzXML files, simply pass the folder path as input.
Each file will be automatically converted to .mzML, processed, and saved.
python CLI.py /path/to/folder --overwrite --verbose
During execution you’ll see messages like:
file: sample1.mzXML loaded correctly
file: sample2.mzXML loaded correctly
Command-Line Options
--output: Output path (optional).--overwrite: Overwrite existing files.--plot: Show diagnostic plots.--verbose: Print detailed execution logs.--mz_window: m/z bin size for oscillation detection (default:0.01).--rt_window: Retention time window for XIC smoothing (default:0.01).
Detection and Correction Workflow
-
Load the input file(s).
- If
.mzXMLis detected, it is converted to.mzML.
- If
-
Extract relevant MS data.
- Retention times (RT), m/z values, and intensities.
-
Detect oscillating m/z values.
- Uses FFT-based power spectrum analysis.
-
Correct oscillations.
- Subtracts a modeled sinusoidal component to recover residual signal.
-
Update spectra.
- Replace oscillating intensities with corrected values.
-
Save results.
- Corrected file is written to disk in
.mzMLformat.
- Corrected file is written to disk in
Examples
Process a single file:
sicritfix data/sample.mzXML --plot
or
python CLI.py data/sample.mzXML --plot
Process all files in a folder:
sicritfix data/sample.mzXML --overwrite
or
python CLI.py data/sample.mzXML --overwrite
Verbose mode:
sicritfix data/sample.mzXML --verbose
or
python CLI.py data/sample.mzML --verbose
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sicritfix-0.0.2.tar.gz.
File metadata
- Download URL: sicritfix-0.0.2.tar.gz
- Upload date:
- Size: 20.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04d52f9ada17e6f7a320aa2d365452aa01b8d7b98f325340f5a20d64a045f13c
|
|
| MD5 |
f882aabe4e0bfbd54d82033e986a0b04
|
|
| BLAKE2b-256 |
0270c950895938ecd7ad68e3930d6b095cfebcc047067988673418fa2630b218
|
File details
Details for the file sicritfix-0.0.2-py3-none-any.whl.
File metadata
- Download URL: sicritfix-0.0.2-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53331733848a5cf0f1e38dc2e5a5fd50ac177414b862813df3a38d322d26f89d
|
|
| MD5 |
95193fd783917f9533059150c73869ff
|
|
| BLAKE2b-256 |
a2ec46567dcc52cba61cd92629b6a742ee24555b2cb067e323058db023b2bf57
|