agentsclimarketplace

Background ion drift detection and removal

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/background-ion-drift-detection-and-removal

Use when processing MS-DIAL peak lists from untargeted LC-MS/MS experiments (DDA or DIA mode) where you suspect instrumental background contamination or ion source carry-over is generating false positive features.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill background-ion-drift-detection-and-removal

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 15 stars15 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its file declares

Copied from the file, not written here

The file declares its own license as CC-BY-4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

6.9 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

background-ion-drift-detection-and-removal

Summary

Detect and remove background ions that exhibit systematic signal intensity drift across an LC-MS analysis run, using retention time-based intensity profiles. This step eliminates spurious features arising from instrument contamination or carry-over that confound metabolite discovery in untargeted metabolomics.

When to use

Apply this skill when processing MS-DIAL peak lists from untargeted LC-MS/MS experiments (DDA or DIA mode) where you suspect instrumental background contamination or ion source carry-over is generating false positive features. Specifically use it when retention time-dependent signal intensity patterns suggest non-biological feature drift across the analytical sequence.

When NOT to use

  • Input is already a fully annotated or curated metabolite set — background drift removal is a preprocessing step for raw peak lists only.
  • Data consist of MS1 scans only (no MS/MS data) — MS-CleanR and this filter require data-dependent or data-independent MS/MS acquisition.
  • Retention time information is missing or unreliable — drift detection depends on accurate RT ordering across the run.

Inputs

  • MS-DIAL peak list (feature table) with columns: m/z, retention time, intensity, sample identifiers
  • Sample class assignments (study samples vs. blanks vs. QCs)

Outputs

  • Filtered MS-DIAL peak list with background drift features removed
  • Feature intensity table ready for RSD/RMD filtering and clustering

How to apply

After loading an MS-DIAL feature table (containing m/z, retention time, intensity, and sample assignments), examine the intensity profile of each feature across the retention time dimension of the analysis run. Identify features whose signal intensity systematically increases, decreases, or otherwise drifts over the course of the run in a manner inconsistent with true metabolites (which should have stable, sample-class-dependent intensity distributions). Remove such drifting features by filtering them from the peak list prior to downstream RSD/RMD thresholding and feature clustering. The tunable parameter is the drift detection threshold, which should be set based on your instrument's baseline contamination behavior and run length.

Related tools

Examples

library(mscleanr); runGUI()

Evaluation signals

  • Verify that removed features exhibit monotonic or strong systematic drift in intensity across retention time, while retained features show stable or sample-class-stratified intensity profiles.
  • Check that the number of removed features is consistent with expected background contamination levels (typically 5–15% of raw features in clean runs).
  • Confirm that downstream RSD/RMD filtering step receives a peak list with reduced spurious background noise, as reflected in fewer features failing quality thresholds.
  • Validate that ion-specific drift removal does not eliminate genuine adducts or fragment ions belonging to true metabolites (cross-check with known internal standards or QC compounds).
  • Ensure retention time distribution of retained features matches expected metabolite elution patterns and is not skewed toward early or late timepoints.

Limitations

  • Drift detection is sensitive to the quality and spacing of blank/QC samples throughout the run; at least 3 blanks are required for robust background characterization (per README).
  • Cannot distinguish between instrumental background drift and genuine biological variability if samples are not properly randomized or if run order is confounded with sample class.
  • Drift thresholds are user-tunable and not automatically optimized; poor threshold choice may retain contamination or discard real features with subtle RT-dependent intensity changes.
  • The method relies on retention time-based intensity profiles and does not account for m/z-specific instrumental artifacts (e.g., space-charge effects in high-mass regions).
  • Data must include MS/MS spectra (DDA or DIA mode); MS1-only data will cause the first MS-CleanR step (which includes this filter) to crash.

Evidence

  • [other] Remove background ions exhibiting systematic drift across the analysis run using retention time-based signal intensity profiles.: "Remove background ions exhibiting systematic drift across the analysis run using retention time-based signal intensity profiles."
  • [readme] MS-CleanR apply generic filters encompassing blank injection signal subtraction, background ions drift removal, unusual mass defect filtering, relative standard deviation threshold (RSD) based on sample class and relative mass defect (RMD) window filtering. All these options are tunable by the user.: "MS-CleanR apply generic filters encompassing blank injection signal subtraction, background ions drift removal, unusual mass defect filtering, relative standard deviation threshold (RSD) based on"
  • [readme] All features without MS/MS will be discarded during the first step. If data contain MS1 only, the first MS-CleanR step will crash.: "All features without MS/MS will be discarded during the first step. If data contain MS1 only, the first MS-CleanR step will crash."
  • [readme] At least 3 blanks and 3 QCs samples are needed for Blank ratio analysis. These samples must be identified as such in the MS-Dial sample list.: "At least 3 blanks and 3 QCs samples are needed for Blank ratio analysis."

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.