agentsclimarketplace

Loess smoothing parameter tuning

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/loess-smoothing-parameter-tuning

Use when your metabolomics SummarizedExperiment object shows signal drift across replicate measurements within individual batches (visible as systematic trends in PCA plots or replicate scatter), and you have intra-batch replicate samples available to estimate smooth drift corrections.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill loess-smoothing-parameter-tuning

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

8.5 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it

loess-smoothing-parameter-tuning

Summary

Apply loess smoothing with optimized parameters (e.g., loessShort with k=5) to correct intra-batch signal drift in metabolomics assays. This non-linear smoothing technique removes unwanted variation within experimental batches while preserving true biological signal.

When to use

Your metabolomics SummarizedExperiment object shows signal drift across replicate measurements within individual batches (visible as systematic trends in PCA plots or replicate scatter), and you have intra-batch replicate samples available to estimate smooth drift corrections. Use this when batch effects manifest as continuous signal degradation rather than discrete batch offsets.

When NOT to use

  • Input assay has not been log-transformed or imputed (rawImpute assay does not exist).
  • Batch effects are discrete/offset-based rather than drift-based (consider robust linear smoothing instead).
  • No intra-batch replicate samples are available to estimate smooth drift corrections.
  • Metabolite data is already normalised by an orthogonal method (e.g., probabilistic quotient normalisation).

Inputs

  • SummarizedExperiment object with rawImpute assay (log-transformed, imputed metabolomics signals)
  • batch metadata column identifying experimental run/batch membership
  • replicate metadata column identifying intra-batch and inter-batch replicate samples

Outputs

  • loessShort_concatenate assay (normalised metabolomics signals with intra-batch drift corrected)
  • SummarizedExperiment object with updated assay slot containing corrected signals

How to apply

Within the hRUV hierarchical normalisation framework, apply loess smoothing as the intra-batch normalisation step by setting intra='loessShort' and intra_k=5 (the number of short replicate neighbors for RUV-III estimation). The loessShort variant applies non-linear smoothing to metabolite signals across the sequence of replicate samples within each batch, correcting for instrumental signal drift. The k=5 parameter controls the local neighborhood size for the RUV-III algorithm that estimates unwanted variation from replicate correlations. After smoothing, extract the resulting loessShort_concatenate assay from the returned SummarizedExperiment object. This approach is applied after log transformation and k-nearest neighbor imputation on the rawImpute assay.

Related tools

Examples

hRUV::hRUV(dat, intra='loessShort', inter='concatenate', intra_k=5, inter_k=5)

Evaluation signals

  • PCA plot of loessShort_concatenate assay shows reduced within-batch scatter and replicate clustering compared to rawImpute assay.
  • Replicate samples within each batch have correlated values in the loessShort_concatenate assay (Pearson r > 0.95 within replicates).
  • Metabolite signal drift across batch sequence (e.g., time-ordered instrumental degradation) is visually attenuated or eliminated in smoothed assay.
  • MA plots or Bland-Altman plots between intra-batch replicates show symmetric scatter around zero post-correction.
  • Output assay dimensions match input rawImpute assay (same features × samples); no features or samples are dropped.

Limitations

  • loessShort parameter choice (k=5) is fixed empirically; no automatic parameter selection method is provided for datasets with different replicate spacing or batch sizes.
  • Loess smoothing assumes monotonic or smooth drift; it may over-smooth sharp instrumental transitions or sample preparation artifacts.
  • Effectiveness depends critically on intra-batch replicate density and placement; sparse or irregularly spaced replicates may yield poor drift estimates.
  • No changelog is available; version stability and backward compatibility of loessShort implementation across hRUV releases are undocumented.

Evidence

  • [intro] For intra batch normalisation, we perform loess smoothing on samples and RUV-III using short replicates with parameter k set to 5: "For intra batch normalisation, we perform loess smoothing on samples and RUV-III using short replicates with parameter k set to 5"
  • [full_text] Call the hRUV function with parameters: intra='loessShort' (intra-batch non-linear smoothing), inter='concatenate' (inter-batch hierarchical structure), intra_k=5 (short replicate neighbors for intra-batch RUV-III): "Call the hRUV function with parameters: intra='loessShort' (intra-batch non-linear smoothing), inter='concatenate' (inter-batch hierarchical structure), intra_k=5 (short replicate neighbors for"
  • [full_text] After applying hruv normalisation with loessShort intra-batch and concatenate inter-batch parameters, the resulting loessShort_concatenate assay eliminates batch effects visible in PCA plots and corrects signal drift across experimental runs.: "After applying hruv normalisation with loessShort intra-batch and concatenate inter-batch parameters, the resulting loessShort_concatenate assay eliminates batch effects visible in PCA plots and"
  • [readme] Our novel tool is a novel hierarchical approach to removing unwanted variation by harnessing information from sample replicates embedded in the seequence of experimental runs/batches and applying signal drift correction with robust linear or non-linear smoothers.: "Our novel tool is a novel hierarchical approach to removing unwanted variation by harnessing information from sample replicates embedded in the seequence of experimental runs/batches and applying"
  • [full_text] Load the SummarizedExperiment object containing the rawImpute assay and batch/replicate metadata. Call the hRUV function with parameters... Extract the resulting normalised loessShort_concatenate assay from the returned SummarizedExperiment object.: "Load the SummarizedExperiment object containing the rawImpute assay and batch/replicate metadata. Call the hRUV function with parameters... Extract the resulting normalised loessShort_concatenate"

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.