agentsclimarketplace

Qc replicate identification and grouping

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/qc-replicate-identification-and-grouping

Use when you have a QC-annotated LC-MS feature table (CSV or data frame format with sample metadata) and need to isolate QC replicate measurements prior to computing quality metrics such as D-Ratio or performing signal drift correction.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill qc-replicate-identification-and-grouping

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.7 KB, ~1.1k tokens by cl100k_base, as published. Nobody here has run it

QC Replicate Identification and Grouping

Summary

Systematically identify and extract quality control (QC) sample replicates from LC-MS metabolomic feature tables to enable computation of batch effect metrics and signal drift assessment. This is a prerequisite step for D-Ratio calculation and QC-based correction in untargeted metabolomics workflows.

When to use

Apply this skill when you have a QC-annotated LC-MS feature table (CSV or data frame format with sample metadata) and need to isolate QC replicate measurements prior to computing quality metrics such as D-Ratio or performing signal drift correction. Specifically use it in the early Correction phase (step 4 of OUKS) before quality assessment or in Filtering (step 6) when D-Ratio filtering is applied.

When NOT to use

  • Input feature table contains no QC-annotated samples (metadata does not include 'QC' label or equivalent).
  • QC replicates are insufficient in number (< 3 replicates) to estimate reliable within-group variance.
  • Feature table is already filtered, normalized, or aggregated; use raw intensity values prior to Correction step instead.

Inputs

  • QC-annotated LC-MS feature intensity table (CSV or R data frame)
  • Sample metadata table with QC label assignments
  • Feature identifiers (m/z, retention time, or compound name)

Outputs

  • Grouped QC replicate feature intensity data frame (features × QC sample replicates)
  • QC sample indices or row numbers for cross-referencing with full feature table
  • QC subset feature table (CSV or R object) ready for variance/drift analysis

How to apply

Load the QC-annotated feature intensity table into R as a data frame or matrix, with sample identifiers (rows) and feature m/z × RT values (columns). Extract and index all rows whose sample metadata column (e.g., 'class' or 'sample_type') equals the QC label (typically 'QC'). Verify that QC replicates are present in multiple injections across the analytical batch (e.g., at sequence start, middle, and end) to capture temporal drift patterns. Group replicate intensities by feature identifier so that subsequent variance, correlation, or D-Ratio calculations can be performed on pooled QC measurements. Export or retain this grouped QC subset as a separate data frame with feature IDs and their replicate intensity vectors for downstream metric computation.

Related tools

Examples

# R code snippet from OUKS Step 4 (Correction.R) pattern:
qc_samples <- feature_table[metadata$class == "QC", ]
qc_intensities <- qc_samples[, grep("^mz_", colnames(qc_samples))]
# Export for D-Ratio computation:
write.csv(qc_intensities, "QC_grouped_replicates.csv", row.names = TRUE)

Evaluation signals

  • QC subset contains only rows whose sample metadata matches the QC label (e.g., 'class == "QC"'); spot-check first and last rows of output to confirm correct filtering.
  • Number of QC replicates per feature is consistent and ≥ 3; inspect the shape of the output data frame (e.g., nrow should equal number of QC samples, ncol should equal number of features).
  • Feature identifiers and intensity values are preserved without duplication or loss; compare sum of intensities before and after grouping to confirm no data loss.
  • Temporal ordering of QC replicates is retained (if relevant for drift assessment); verify that run order or injection sequence is logged alongside grouped intensities.
  • Output format matches the input schema expected by downstream D-Ratio or MetCorR functions (e.g., data frame with feature IDs and replicate intensity columns).

Limitations

  • If QC samples are injected only once at the beginning or end of a batch (not distributed throughout), drift detection and correction will be unreliable.
  • Presence of missing values or imputation artifacts in QC replicates can inflate within-group variance estimates; inspect for missing intensity patterns before grouping.
  • QC label assignment must be consistent and correctly spelled in metadata; mismatches or typos (e.g., 'QC' vs. 'qc' vs. 'quality_control') will cause QC samples to be missed.
  • No automated validation of QC replicate chemical or instrumental consistency; identical QC composition and identical LC-MS parameters are assumed but not verified by this step alone.

Evidence

  • [other] Identify QC sample replicates and extract their feature intensity values: "Identify QC sample replicates and extract their feature intensity values."
  • [other] QC-annotated feature table in Correction step: "Load the QC-annotated feature table (CSV or data frame format) into R."
  • [other] D-Ratio metric depends on QC group extraction: "Calculate the D-Ratio for each feature as the ratio of between-group variance to within-group variance (or mean intensity in QC replicates to pooled standard deviation across all samples)"
  • [readme] QC samples used in MetCorR GAM fitting: "Fitting GAMs on QC samples..."

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.