agentsclimarketplace

2d tic preprocessing

Skill HolobiomicsLab/asb-skill-collections/packs/metabolomics/lc-ms/skills/2d-tic-preprocessing

Curated, evidence-grounded skill and software-tool collections for scientific AI agents, generated by the AgenticScienceBuilder

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill 2d-tic-preprocessing

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

  • 14 stars14 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 author says it does

Copied from the file, not written here

Use when when you have raw GCxGC-MS data imported from NetCDF into a 2D-TIC chromatogram object and need to remove chemical and instrumental noise (column bleeding, baseline drift, detector contamination) to reveal metabolite differences between sample groups for downstream multiway PCA or.

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

7.1 KB, as published. Nobody here has run it

2D-TIC preprocessing

Summary

A multi-stage preprocessing pipeline for two-dimensional total intensity chromatogram (2D-TIC) objects that applies smoothing, baseline correction, and peak alignment to remove instrumental noise and artifacts from GCxGC-MS data before multivariate analysis.

When to use

When you have raw GCxGC-MS data imported from NetCDF into a 2D-TIC chromatogram object and need to remove chemical and instrumental noise (column bleeding, baseline drift, detector contamination) to reveal metabolite differences between sample groups for downstream multiway PCA or supervised classification.

When NOT to use

  • Input data is already a processed feature matrix or peak table (preprocessing is only applicable to raw chromatogram objects)
  • The chromatogram data is from a non-GCxGC platform (e.g., HPLC, UPLC) where 2D alignment may not be appropriate
  • Baseline distortion is minimal or the analytical goal is to preserve absolute intensity values for quantification rather than pattern discovery

Inputs

  • 2D-TIC chromatogram object (from read_chrom applied to NetCDF raw data)
  • Reference chromatogram (for 2DCOW alignment)

Outputs

  • Smoothed 2D-TIC chromatogram object
  • Baseline-corrected 2D-TIC chromatogram object
  • Peak-aligned 2D-TIC chromatogram object
  • Joined multi-sample chromatogram R object ready for MPCA

How to apply

Load the 2D-TIC chromatogram object (output from read_chrom on a NetCDF file) and sequentially apply: (1) Whittaker smoothing via wsmooth to reduce high-frequency noise, (2) asymmetric least squares baseline correction via baseline_corr to remove steady and increasing intensity artifacts, and (3) 2D correlation optimized warping (2DCOW) via twod_cow or batch_2DCOW to align peaks across samples. The asymmetric least squares algorithm prioritizes fitting the baseline at low intensity regions while allowing peaks to deviate, making it robust to column bleeding and instrumental drift. After alignment, join all preprocessed chromatograms into a single R object using join_chromatograms before multiway PCA analysis.

Related tools

  • RGCxGC (Provides wsmooth, baseline_corr, twod_cow, batch_2DCOW, join_chromatograms, and m_prcomp functions for 2D-TIC preprocessing and multiway PCA) — https://github.com/DanielQuiroz97/RGCxGC
  • R (Runtime environment for executing RGCxGC preprocessing functions)

Examples

# Load 2D-TIC, apply smoothing, baseline correction, and 2DCOW alignment
chrom_smooth <- wsmooth(chrom_obj, lambda = 1e4, d = 2)
chrom_bc <- baseline_corr(chrom_smooth, lambda = 1e6, p = 0.01)
chrom_aligned <- batch_2DCOW(chrom_bc, reference = ref_chrom)
chrom_joined <- join_chromatograms(chrom_aligned_list)

Evaluation signals

  • Baseline-corrected chromatogram shows reduced low-intensity baseline drift with preserved peak heights compared to raw 2D-TIC
  • Smoothed chromatogram exhibits reduced high-frequency noise while maintaining peak shape and resolution
  • Aligned chromatograms from batch_2DCOW show consistent peak positions across replicates when overlaid
  • Joined multi-sample object contains no NA or missing values and all samples have identical retention time and modulation time dimensions
  • Downstream MPCA score plot shows clear separation between biological groups (e.g., typhoid carriers vs. controls) after preprocessing, indicating noise reduction revealed biological signal

Limitations

  • Asymmetric least squares baseline correction performance depends on the choice of smoothness and asymmetry parameters; suboptimal tuning may over-correct or under-correct baseline distortion
  • 2DCOW peak alignment requires careful selection of reference chromatogram; a poor reference may propagate misalignment across all samples
  • Preprocessing pipeline assumes column bleeding and instrumental drift are the primary sources of baseline distortion; other artifacts (e.g., sample matrix effects) may not be fully resolved
  • The sequential application of smoothing, baseline correction, and alignment may introduce cumulative distortions if parameters are not carefully validated

Evidence

  • [other] baseline_corr removes baseline distortion from 2D-TIC: "The baseline_corr function applies the asymmetric least squares algorithm to remove steady and increasing intensity from 2D-TIC chromatograms caused by instrumental contamination or column bleeding"
  • [intro] smoothing and baseline correction reduce noise before multivariate analysis: "noise can be significantly reduced by using preprocessing algorithms, herein smoothing, baseline correction, and peak alignment. Then, in order to reveal differences between groups, multivariate"
  • [readme] RGCxGC offers baseline correction based on asymmetric least squares: "RGCxGC offers common pre-processing algorithms for signal enhancement, such as baseline correction based on asymetric least squares"
  • [intro] 2D-TIC is created from NetCDF import and folded via read_chrom: "the raw chromatogram is importing from a NetCDF file and is folded into the two-dimensional Total Intensity Chromatogram (2D-TIC)"
  • [intro] wsmooth and baseline_corr are applied sequentially for preprocessing: "you can perform preprocessing routines like smoothing and/or baseline correction by using the function wsmooth and baseline_corr"
  • [intro] 2DCOW aligns peaks across samples before joining: "peak alignment of a single sample against a reference chromatogram can be performed based on the two-dimensional correlation optimized warping (2DCOW) algorithm. Alternatively, multiple sample"
  • [intro] Preprocessed chromatograms are joined into single object before MPCA: "Once the chromatograms are already preprocessed, it has to be in a single R object. To meet this requirement, the join_chromatograms functions does it"

Keep looking

Skills are one crate of 328,083. 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.