agentsclimarketplace

Quality control metric computation

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/quality-control-metric-computation

Use when after feature integration and imputation when you have QC-annotated LC-MS feature intensity data (CSV or data frame format) with replicate QC samples.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill quality-control-metric-computation

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

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

quality-control-metric-computation

Summary

Compute the D-Ratio quality metric for LC-MS metabolomic features using QC sample replicates to assess feature reliability and signal consistency. The D-Ratio quantifies the ratio of between-group variance to within-group variance, enabling downstream filtering of unreliable features in the Correction step of untargeted metabolomics workflows.

When to use

Apply this skill after feature integration and imputation when you have QC-annotated LC-MS feature intensity data (CSV or data frame format) with replicate QC samples. Use it to generate per-feature quality scores before the Filtering step (step 6), especially when technical variation and signal drift need to be characterized in metabolomic profiling studies.

When NOT to use

  • Input lacks QC sample replicates or QC annotations — D-Ratio requires replicate QC measurements to estimate within-group variance.
  • Feature table has already been filtered by quality metrics — applying D-Ratio computation post-filtering on a reduced feature set may bias the variance estimates.
  • Study design includes only single QC injections per batch — insufficient replication to reliably estimate pooled standard deviation.

Inputs

  • QC-annotated feature intensity table (CSV or R data frame)
  • Sample metadata with QC replicate identifiers
  • Feature identifiers and their corresponding intensity vectors

Outputs

  • D-Ratio data frame (feature ID × D-Ratio score)
  • D-Ratio CSV export file for downstream filtering

How to apply

Load the QC-annotated feature table into R and identify all QC sample replicates by their sample class label. For each feature, extract the intensity values from QC replicates and calculate the D-Ratio as the ratio of mean intensity in QC replicates to pooled standard deviation across all samples (or equivalently, between-group variance to within-group variance). Compile the per-feature D-Ratio values into a data frame indexed by feature identifier. Export the D-Ratio table to CSV format for downstream use in the Filtering step, where D-Ratio thresholds are applied to remove features with low quality scores.

Related tools

Examples

# Load feature table and metadata in R; extract QC replicates and compute D-Ratio
qc_samples <- metadata[metadata$class == "QC", ]
for (feature in colnames(feature_table)) {
  qc_intensity <- feature_table[rownames(feature_table) %in% qc_samples$sample_id, feature]
  d_ratio[feature] <- mean(qc_intensity) / sd(feature_table[[feature]])
}
write.csv(d_ratio, "D-Ratio_metrics.csv")

Evaluation signals

  • D-Ratio values are numeric, non-negative, and assigned to every feature in the input table with no missing values
  • QC replicate samples produce lower D-Ratio variance than technical replicates across the full sample set, indicating consistent QC signal
  • D-Ratio distribution shows expected separation: high-quality features (D-Ratio > threshold) retain signal, low-quality features (D-Ratio < threshold) are enriched in noise or artifacts
  • CSV export preserves feature identifiers and D-Ratio scores in consistent row order matching the input feature table
  • Downstream Filtering step (step 6) successfully removes features below the D-Ratio cutoff without errors or data loss

Limitations

  • D-Ratio computation assumes QC replicates are representative of biological and technical variance across all samples; poor QC design (e.g., QC replicates do not span full batch) may yield biased estimates.
  • D-Ratio is sensitive to missing values in QC replicates; if imputation was performed (step 3), artificially reduced variance in imputed QC values may inflate D-Ratio scores.
  • No guidance provided in the article on parameter selection or D-Ratio threshold cutoff for filtering — threshold determination is left to practitioner discretion.
  • D-Ratio does not account for feature-specific factors such as ionization efficiency or chromatographic behavior; a single threshold may not be optimal across all chemical classes.

Evidence

  • [other] OUKS step 4 (Correction) implements D-Ratio as a quality metric for evaluating features in QC-annotated metabolomic data, with outputs subsequently used in step 6 (Filtering) where D-Ratio filtering is applied to remove unreliable features.: "OUKS step 4 (Correction) implements D-Ratio as a quality metric for evaluating features in QC-annotated metabolomic data, with outputs subsequently used in step 6 (Filtering) where D-Ratio filtering"
  • [other] 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), following the OUKS step 4 (Correction) metric definition.: "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] "4. Correction": D-Ratio metric, RLA-plot, correlogram, 2-factors PCA: ""4. Correction": D-Ratio metric, RLA-plot, correlogram, 2-factors PCA"
  • [readme] comprehensive nine step LC-MS untargeted metabolomic profiling data processing toolbox: "comprehensive nine step LC-MS untargeted metabolomic profiling data processing toolbox"
  • [readme] The only requirements are to be familiar with the basic syntax of the R language, PC with Internet connection and Windows OS (desirable), RStudio and R (≥ 4.1.2).: "The only requirements are to be familiar with the basic syntax of the R language, PC with Internet connection and Windows OS (desirable), RStudio and R (≥ 4.1.2)."

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.