agentsclimarketplace

Technical variation removal in lcms data

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/technical-variation-removal-in-lcms-data

Use when after merging feature tables from non-targeted LC-MS/MS data and before statistical analysis, when samples were acquired across multiple instrument runs, different days, or instrumental calibration cycles.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill technical-variation-removal-in-lcms-data

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

Batch Correction in Non-Targeted LC-MS/MS Metabolomics

Summary

Batch correction removes technical variation introduced during LC-MS/MS acquisition from merged feature tables while preserving biological signal. This skill is essential in non-targeted metabolomics workflows to enable valid statistical comparisons across samples acquired in different batches.

When to use

Apply this skill after merging feature tables from non-targeted LC-MS/MS data and before statistical analysis, when samples were acquired across multiple instrument runs, different days, or instrumental calibration cycles. Batch effects are indicated by systematic clustering of samples by acquisition batch rather than biological condition in exploratory plots.

When NOT to use

  • Input feature table has not yet been merged from individual sample files
  • Samples were all acquired in a single batch with no technical replication across instrument runs
  • Batch identifiers are not clearly documented or unmappable to individual samples

Inputs

  • Merged feature table from non-targeted LC-MS/MS data (samples × features matrix)
  • Experimental metadata file with batch identifiers mapped to each sample

Outputs

  • Batch-corrected feature table (same dimensions as input, CSV or TSV format)
  • Quality control plots showing batch effect removal

How to apply

Load the merged feature table (samples as columns, features as rows) into R or Python along with experimental metadata containing batch identifiers for each sample. Select an appropriate batch correction method such as ComBat or SVA that removes batch-associated technical variation while preserving biological signal. Apply the chosen normalization technique to the feature table, ensuring that the corrected output maintains the same dimensions and sample/feature structure as the input. Export the batch-corrected feature table to CSV or TSV format preserving the original input structure for downstream statistical analysis.

Related tools

Examples

# In R within Jupyter Notebook or Colab:
metadata <- read.csv('sample_metadata.csv', row.names=1)
batch_ids <- metadata$batch
feature_table_corrected <- ComBat(dat=feature_table, batch=batch_ids, par.prior=TRUE)
write.csv(feature_table_corrected, 'batch_corrected_features.csv')

Evaluation signals

  • Batch-corrected feature table has identical dimensions to input (same number of samples and features)
  • Principal component analysis (PCA) or other unsupervised ordination shows reduced clustering by batch and retention of biological condition separation
  • Distribution of feature intensities across samples remains consistent before and after correction (no artificial signal amplification or loss)
  • CSV/TSV output file matches original input format and can be directly imported into downstream statistical analysis tools
  • Batch identifiers no longer correlate significantly with principal components in corrected data when tested via permutation or linear regression

Limitations

  • Batch correction methods assume systematic (not random) batch effects; small or highly irregular batch effects may be under-corrected
  • Over-correction can remove true biological variation if biological conditions are confounded with batch; experimental design should minimize batch-condition confounding
  • Methods like ComBat require sufficient samples per batch to estimate batch parameters accurately; severely imbalanced batch designs may fail
  • Corrected values may become negative or violate the typical non-negative intensity bounds of MS data; users should verify biological plausibility of corrected intensities

Evidence

  • [other] The FBMN-STATS workflow includes batch correction as a processing step applied to merged feature tables from non-targeted LC-MS/MS data, positioned after data merging and cleanup and before statistical analysis.: "batch correction as a processing step applied to merged feature tables from non-targeted LC-MS/MS data, positioned after data merging and cleanup and before statistical analysis"
  • [other] Apply batch correction using an appropriate method (e.g., ComBat, SVA, or similar normalization technique) to remove batch effects while preserving biological signal.: "Apply batch correction using an appropriate method (e.g., ComBat, SVA, or similar normalization technique) to remove batch effects while preserving biological signal"
  • [readme] perform data merging, data cleanup, blank removal, batch correction, and univariate and multivariate statistical analyses on their non-targeted LC-MS/MS data and Feature-based Molecular Networks.: "perform data merging, data cleanup, blank removal, batch correction, and univariate and multivariate statistical analyses on their non-targeted LC-MS/MS data"
  • [other] Load the merged feature table (with samples as columns and features as rows) into R or Python.: "Load the merged feature table (with samples as columns and features as rows) into R or Python"
  • [other] Export the batch-corrected feature table to a CSV or TSV file matching the original input structure.: "Export the batch-corrected feature table to a CSV or TSV file matching the original input structure"

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.