Skip to content
Back to skills

Peak List Filtering For Quality Control

ASecurity

Use when you have extracted a raw peak list (chemical shifts in a TXT

  • 16 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 12, 2026
ai-agentsgit

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro shows the line behind each finding and how to fix it

Scanned September 12, 2026

npx -y skills add HolobiomicsLab/asb-skill-collections --skill peak-list-filtering-for-quality-control --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Peak List Filtering For Quality Control?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Peak List Filtering For Quality Control
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/holobiomicslab-peak-list-filtering-for-quality-control/badge)](https://www.skillsdirectory.com/skills/holobiomicslab-peak-list-filtering-for-quality-control)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: peak-list-filtering-for-quality-control
description: Use when you have extracted a raw peak list (chemical shifts in a TXT
  file, one per row) from a 1D 1H NMR spectrum and intend to pass it to NMRformer
  or a similar deep learning model for metabolite identification.
license: CC-BY-4.0
metadata:
  edam_operation: http://edamontology.org/operation_3695
  edam_topics:
  - http://edamontology.org/topic_3172
  - http://edamontology.org/topic_0769
  tools:
  - PyTorch
  - NumPy
  - Pandas
  - SciPy
  - NMRformer
  techniques:
  - NMR
  license_tier: open
  provenance_tier: literature
derived_from:
- doi: 10.1021/acs.analchem.4c05632
  title: NMRformer
evidence_spans:
- torch 1.10.0+cu113
- pip install numpy==1.26.4
- pip install pandas==1.5.1
- pip install scipy
claims: []
provenance:
  collection: https://w3id.org/holobiomicslab/asb-skill/collection/metabolomics/v2
  assembled_by: scripts/collect_metabolomics_collection.py
  sources:
  - build: coll_nmrformer_cq
    doi: 10.1021/acs.analchem.4c05632
    title: NMRformer
  dedup_kept_from: coll_nmrformer_cq
schema_version: 0.2.0
attribution:
  generator: AgenticScienceBuilder
  original_doi: 10.1021/acs.analchem.4c05632
  all_source_dois:
  - 10.1021/acs.analchem.4c05632
  zenodo_doi: 10.5281/zenodo.20794027
  curators: []
  promoter: Louis-Félix Nothias
  sponsor: CNRS & Université Côte d'Azur
---

# peak-list-filtering-for-quality-control

## Summary

Filter noisy and unrecognized peaks from 1D 1H NMR spectral peak lists before downstream metabolite identification to prevent degradation of model output. This preprocessing step removes peaks that cannot be reliably assigned, improving the quality of peak-to-metabolite assignments in Transformer-based spectral analysis.

## When to use

Apply this skill when you have extracted a raw peak list (chemical shifts in a TXT file, one per row) from a 1D 1H NMR spectrum and intend to pass it to NMRformer or a similar deep learning model for metabolite identification. Use it specifically when the raw peak list may contain instrumental noise, solvent residuals, or chemical shifts that fall outside the model's training domain, before loading the spectrum and peak data into the model.

## When NOT to use

- The peak list has already been validated or filtered by the NMR instrument's software or a prior curation step.
- The input is a fully processed feature table or metabolite quantification matrix rather than raw peak picks.
- Your model or workflow explicitly expects and handles noisy peaks (e.g., a denoising model is applied after metabolite identification).

## Inputs

- Peak-list TXT file (one chemical shift value per row, in ppm)
- 1D 1H NMR spectrum CSV file (first column: chemical shift, second column: intensity)
- Domain knowledge or reference data on expected peak ranges and known artifacts

## Outputs

- Filtered peak-list TXT file (same format, noisy/unrecognized peaks removed)
- Quality control report or metadata (number of peaks removed, filtering criteria applied)

## How to apply

Before passing the peak list to NMRformer, inspect each peak's chemical shift value and remove entries that represent known noise, artifacts, or peaks outside the model's recognition range. The README explicitly warns that 'noisy peaks or unrecognized peaks in the input spectral peak list can negatively affect model output', so prioritize aggressive filtering of low-confidence peaks. Filter the TXT file in-place or create a new filtered peak list, then verify that the filtered list contains only peaks with clear spectroscopic meaning (e.g., within the 0–10 ppm range for 1H NMR, excluding solvent residuals). Pass only the filtered peak list to NMRformer.ipynb alongside the preprocessed spectrum CSV to generate the metabolite assignments output.csv file.

## Related tools

- **NMRformer** (Downstream Transformer-based model that consumes the filtered peak list and spectrum to generate peak-to-metabolite assignments; filtering improves its output quality.) — https://github.com/zza1211/NMRformer
- **Pandas** (Data manipulation library for loading, inspecting, and filtering the peak list TXT file programmatically.)
- **NumPy** (Numerical library for vectorized filtering operations on peak shift arrays.)

## Examples

```
import pandas as pd; peaks = pd.read_csv('input_peaks.txt', header=None); filtered = peaks[(peaks[0] >= 0.5) & (peaks[0] <= 10.0)].drop_duplicates(); filtered.to_csv('filtered_peaks.txt', index=False, header=False)
```

## Evaluation signals

- The filtered peak list contains no duplicate chemical shift values.
- All retained peaks fall within the expected 1H NMR chemical shift range (typically 0–10 ppm) and do not overlap with known solvent residuals (e.g., water at ~4.7 ppm, DMSO at ~2.5 ppm).
- The output.csv file generated by NMRformer after filtering shows no 'undefined' or 'unknown' metabolite assignments for the filtered peaks, or shows improved assignment confidence scores compared to unfiltered input.
- The number of peaks retained is consistent with expected metabolite complexity for the biological sample type (e.g., serum metabolomics typically yields 50–200 peaks).
- Comparison of metabolite assignments before and after filtering shows removal of spurious or low-confidence assignments, with core metabolites preserved.

## Limitations

- Filtering criteria must be manually defined or calibrated; no automated threshold is provided in the README or article.
- Overly aggressive filtering may remove weak but genuine peaks (e.g., minor metabolites with low signal intensity), reducing metabolite coverage.
- The article does not specify quantitative thresholds for 'noisy' or 'unrecognized' peaks; filtering quality depends on domain expertise.
- Peak filtering alone does not address spectral preprocessing issues such as baseline distortion or peak overlap; complementary preprocessing steps may be needed.

## Evidence

- [readme] When you input peaks that cannot be recognized or noisy peaks into the model, it will affect the output of the model, so please try to filter the peaks in the input spectral peak list as much as possible.: "When you input peaks that cannot be recognized or noisy peaks into the model, it will affect the output of the model, so please try to filter the peaks in the input spectral peak list as much as"
- [intro] Noisy peaks or unrecognized peaks in the input spectral peak list can negatively affect model output.: "Noisy peaks or unrecognized peaks in the input spectral peak list can negatively affect model output."
- [intro] Verify and filter the peak list to remove unrecognized or noisy peaks as recommended by the model.: "Verify and filter the peak list to remove unrecognized or noisy peaks as recommended by the model."
- [readme] txt file, one data per row, representing the chemical shift of the peak in the spectrum.: "txt file, one data per row, representing the chemical shift of the peak in the spectrum."
- [readme] resulting in an output.csv file that contains the corresponding metabolites and probabilities for each peak.: "resulting in an output.csv file that contains the corresponding metabolites and probabilities for each peak."

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.