mass-to-charge-tolerance-filtering
Summary
Filter ion peaks in CE-MS data by specifying narrow m/z tolerance windows to ensure correct peak detection during extracted ion electropherogram (EIE) generation. This skill is essential when extracting migration times of known markers (e.g., EOF markers) where precise m/z ranges prevent false peak assignments.
When to use
Apply this skill when extracting migration times of specific analyte or reference markers (e.g., Paracetamol EOF marker) from CE-MS files using peak-picking workflows. Use it when the getMtime() function or similar extracted ion electropherogram methods require m/z-range filtering to isolate a single peak of interest from a crowded mass spectrum.
When NOT to use
- When you do not have a prior knowledge of the target marker's theoretical m/z value or approximate migration time window.
- When the goal is untargeted feature detection across the full m/z and MT range (use full-spectrum peak picking instead).
- When the m/z tolerance is already defined by a pre-computed feature matrix or reference library (use library matching instead).
Inputs
- OnDiskMSnExp object (CE-MS raw data, loaded from msdata package or equivalent)
- Theoretical m/z value of target marker (e.g., Paracetamol)
- Approximate migration time range for the marker (in minutes or seconds)
Outputs
- Extracted Ion Electropherogram (EIE) filtered by m/z tolerance
- Peak table with detected marker peak(s), migration time(s), and intensity(ies)
- Per-file migration time table with file identifiers and MT values
How to apply
Define a narrow m/z tolerance range (e.g., ±0.5 Da or tighter, depending on instrument resolution) centered on the target marker's theoretical m/z value. Pass this m/z-range as a parameter to the peak-detection function (e.g., getMtime with mz-range argument, or xcms::findChromPeaks on an EIE). Combine the m/z filter with a migration time (MT) range filter to further constrain the search space and ensure the peak-picking algorithm identifies only the intended marker. The rationale is that narrow m/z and MT ranges together prevent spurious peak detection and ensure reproducible extraction of marker migration times across multiple CE-MS files.
Related tools
- MobilityTransformR (Implements getMtime() function to extract migration times with m/z and MT-range filtering; provides the primary workflow for this skill) — https://github.com/LiesaSalzer/MobilityTransformR
- xcms (Provides findChromPeaks() function for peak detection on extracted ion electropherograms filtered by m/z tolerance)
- MetaboCoreUtils (Contributes utility functions for effective mobility transformation and m/z-based filtering)
- MSnbase (Provides OnDiskMSnExp object class and spectral data handling for m/z filtering operations)
- Spectra (Enables efficient m/z-based filtering and extraction of ion traces)
- msdata (Provides CE-MS test data files for development and validation of m/z filtering workflows)
Examples
getMtime(object = mse, mz = c(194.08, 194.10), MT = c(8, 12))
Evaluation signals
- EIE plot shows a single, well-isolated peak at the expected migration time (no spurious peaks or baseline noise).
- Peak detection success rate is 100% across all input CE-MS files (all files yield a valid MT value, with no failed peak picks).
- Extracted MT values are reproducible and fall within the expected range for the marker in the given electrophoretic system.
- The m/z range filter excludes interfering ions: verify by comparing EIE with and without m/z filtering, or by inspecting the raw spectrum at the detected MT.
- Output per-file MT table has no missing values and all MT entries are numeric and within the specified MT-range bounds.
Limitations
- Narrow m/z tolerances may fail to detect the marker if the theoretical m/z is inaccurate or if the instrument's mass calibration is poor.
- Migration time shifts caused by electroosmotic flow (EOF) variations between runs may cause the marker peak to fall outside the predefined MT-range filter, leading to missed detections.
- Effective mobility transformation for CE-MS is not as straightforward as CE-UV; m/z-based filtering alone does not address MT drift, which may require concurrent use of internal standards or EOF markers.
- Performance depends critically on having accurate prior knowledge of both the target marker's m/z and its typical MT window; for novel or unstable markers, an exploratory untargeted analysis may be necessary first.
Evidence
- [other] The getMtime() function accepts an OnDiskMSnExp object, mz-range, and MT-range as inputs and determines the migration time of a marker peak by generating an Extracted Ion Electropherogram (EIE) and using findChromPeaks from xcms to pick the peak, with narrow mz and mt ranges required to ensure correct peak detection.: "The getMtime() function accepts an OnDiskMSnExp object, mz-range, and MT-range as inputs and determines the migration time of a marker peak by generating an Extracted Ion Electropherogram (EIE) and"
- [intro] the effective mobility µ_eff of a compound remains stable in the same electrophoretic system. The use of an effective mobility scale instead of a migration time scale circumvents the drawback of MT: "the effective mobility µ_eff of a compound remains stable in the same electrophoretic system. The use of an effective mobility scale instead of a migration time scale circumvents the drawback of MT"
- [intro] Effective mobility transformation for CE-MS data is not as straightforward as in CE-UV and until now and to our knowledge there is no implementation in R that performs effective mobility: "Effective mobility transformation for CE-MS data is not as straightforward as in CE-UV and until now and to our knowledge there is no implementation in R that performs effective mobility"
- [intro] The transformation is performed using functionality from the packages
r BiocStyle::Biocpkg("xcms"): "The transformation is performed using functionality from the packages xcms"
- [readme] To install MobilityTransformR, use the stable version available at Bioconductor. Enter: if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager"); BiocManager::install("MobilityTransformR"): "To install MobilityTransformR, use the stable version available at Bioconductor"
1---2name: mass-to-charge-tolerance-filtering3description: Use when extracting migration times of specific analyte or reference markers (e.g., Paracetamol EOF marker) from CE-MS files using peak-picking workflows.4license: CC-BY-4.05---67# mass-to-charge-tolerance-filtering89## Summary1011Filter ion peaks in CE-MS data by specifying narrow m/z tolerance windows to ensure correct peak detection during extracted ion electropherogram (EIE) generation. This skill is essential when extracting migration times of known markers (e.g., EOF markers) where precise m/z ranges prevent false peak assignments.1213## When to use1415Apply this skill when extracting migration times of specific analyte or reference markers (e.g., Paracetamol EOF marker) from CE-MS files using peak-picking workflows. Use it when the getMtime() function or similar extracted ion electropherogram methods require m/z-range filtering to isolate a single peak of interest from a crowded mass spectrum.1617## When NOT to use1819- When you do not have a prior knowledge of the target marker's theoretical m/z value or approximate migration time window.20- When the goal is untargeted feature detection across the full m/z and MT range (use full-spectrum peak picking instead).21- When the m/z tolerance is already defined by a pre-computed feature matrix or reference library (use library matching instead).2223## Inputs2425- OnDiskMSnExp object (CE-MS raw data, loaded from msdata package or equivalent)26- Theoretical m/z value of target marker (e.g., Paracetamol)27- Approximate migration time range for the marker (in minutes or seconds)2829## Outputs3031- Extracted Ion Electropherogram (EIE) filtered by m/z tolerance32- Peak table with detected marker peak(s), migration time(s), and intensity(ies)33- Per-file migration time table with file identifiers and MT values3435## How to apply3637Define a narrow m/z tolerance range (e.g., ±0.5 Da or tighter, depending on instrument resolution) centered on the target marker's theoretical m/z value. Pass this m/z-range as a parameter to the peak-detection function (e.g., getMtime with mz-range argument, or xcms::findChromPeaks on an EIE). Combine the m/z filter with a migration time (MT) range filter to further constrain the search space and ensure the peak-picking algorithm identifies only the intended marker. The rationale is that narrow m/z and MT ranges together prevent spurious peak detection and ensure reproducible extraction of marker migration times across multiple CE-MS files.3839## Related tools4041- **MobilityTransformR** (Implements getMtime() function to extract migration times with m/z and MT-range filtering; provides the primary workflow for this skill) — https://github.com/LiesaSalzer/MobilityTransformR42- **xcms** (Provides findChromPeaks() function for peak detection on extracted ion electropherograms filtered by m/z tolerance)43- **MetaboCoreUtils** (Contributes utility functions for effective mobility transformation and m/z-based filtering)44- **MSnbase** (Provides OnDiskMSnExp object class and spectral data handling for m/z filtering operations)45- **Spectra** (Enables efficient m/z-based filtering and extraction of ion traces)46- **msdata** (Provides CE-MS test data files for development and validation of m/z filtering workflows)4748## Examples4950```51getMtime(object = mse, mz = c(194.08, 194.10), MT = c(8, 12))52```5354## Evaluation signals5556- EIE plot shows a single, well-isolated peak at the expected migration time (no spurious peaks or baseline noise).57- Peak detection success rate is 100% across all input CE-MS files (all files yield a valid MT value, with no failed peak picks).58- Extracted MT values are reproducible and fall within the expected range for the marker in the given electrophoretic system.59- The m/z range filter excludes interfering ions: verify by comparing EIE with and without m/z filtering, or by inspecting the raw spectrum at the detected MT.60- Output per-file MT table has no missing values and all MT entries are numeric and within the specified MT-range bounds.6162## Limitations6364- Narrow m/z tolerances may fail to detect the marker if the theoretical m/z is inaccurate or if the instrument's mass calibration is poor.65- Migration time shifts caused by electroosmotic flow (EOF) variations between runs may cause the marker peak to fall outside the predefined MT-range filter, leading to missed detections.66- Effective mobility transformation for CE-MS is not as straightforward as CE-UV; m/z-based filtering alone does not address MT drift, which may require concurrent use of internal standards or EOF markers.67- Performance depends critically on having accurate prior knowledge of both the target marker's m/z and its typical MT window; for novel or unstable markers, an exploratory untargeted analysis may be necessary first.6869## Evidence7071- [other] The getMtime() function accepts an OnDiskMSnExp object, mz-range, and MT-range as inputs and determines the migration time of a marker peak by generating an Extracted Ion Electropherogram (EIE) and using findChromPeaks from xcms to pick the peak, with narrow mz and mt ranges required to ensure correct peak detection.: "The getMtime() function accepts an OnDiskMSnExp object, mz-range, and MT-range as inputs and determines the migration time of a marker peak by generating an Extracted Ion Electropherogram (EIE) and"72- [intro] the effective mobility µ_eff of a compound remains stable in the same electrophoretic system. The use of an effective mobility scale instead of a migration time scale circumvents the drawback of MT: "the effective mobility µ_eff of a compound remains stable in the same electrophoretic system. The use of an effective mobility scale instead of a migration time scale circumvents the drawback of MT"73- [intro] Effective mobility transformation for CE-MS data is not as straightforward as in CE-UV and until now and to our knowledge there is no implementation in R that performs effective mobility: "Effective mobility transformation for CE-MS data is not as straightforward as in CE-UV and until now and to our knowledge there is no implementation in R that performs effective mobility"74- [intro] The transformation is performed using functionality from the packages `r BiocStyle::Biocpkg("xcms")`: "The transformation is performed using functionality from the packages xcms"75- [readme] To install MobilityTransformR, use the stable version available at Bioconductor. Enter: if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager"); BiocManager::install("MobilityTransformR"): "To install MobilityTransformR, use the stable version available at Bioconductor"