agentsclimarketplace

Assay ratio computation verification

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v1/skills/assay-ratio-computation-verification

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 assay-ratio-computation-verification

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 after calling buildExperiment on metabolomics data to construct a SummarizedExperiment object, before performing batch correction, outlier detection, or other QC calculations that depend on ratio assay values.

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

assay-ratio-computation-verification

Summary

Verify that the ratio assay (compound area divided by internal standard area) is correctly computed in a SummarizedExperiment object, including validation of default behavior when no secondary assay is provided. This skill ensures the mathematical correctness of the normalized compound/internal standard ratios before downstream QC analyses.

When to use

After calling buildExperiment on metabolomics data to construct a SummarizedExperiment object, before performing batch correction, outlier detection, or other QC calculations that depend on ratio assay values. Essential when verifying the behavior of internal standard normalization, especially when testing edge cases such as missing or unspecified secondary assay columns.

When NOT to use

  • When the input is already a SummarizedExperiment object without need for re-construction—use existing assay slots directly instead.
  • When only raw compound areas are needed and internal standard normalization is not intended for the downstream analysis.
  • When secondary assay (internal standard) data are not available or present in the dataset—skip ratio verification and work with primary assay only.

Inputs

  • tab-delimited metabolomics data file (TSV format)
  • data frame from readData function with mandatory columns for compounds, samples, and assay values
  • optionally: column name specification for primary and secondary assays

Outputs

  • SummarizedExperiment object with validated 'ratio' assay
  • element-wise comparison report confirming ratio = primary / secondary (or primary if secondary absent)
  • validation boolean or summary table confirming all ratios are computed correctly

How to apply

Load metabolomics data using readData, which validates column integrity and format. Call buildExperiment on the resulting data frame, optionally specifying column mappings for compounds (features), samples (aliquots), primary assay (compound area), and secondary assay (internal standard area). Extract the 'ratio' assay from the returned SummarizedExperiment object. For cases where secondaryAssay is not provided, verify that the ratio assay equals the primary assay values element-wise (confirming an implicit divisor of 1). For cases where secondaryAssay is specified, verify that each ratio value equals the primary assay divided by the corresponding secondary assay value across all compound–sample pairs. Compare using exact equality or tolerance-based checks depending on numerical precision requirements.

Related tools

  • mzQuality (R package that constructs SummarizedExperiment objects and computes ratio assays from metabolomics data; provides buildExperiment and readData functions used to load and structure data) — https://github.com/hankemeierlab/mzQuality
  • SummarizedExperiment (Bioconductor data structure class that stores assay matrices (including 'ratio'), row metadata (compound data), and column metadata (sample data); the core object format for mzQuality)
  • R (Language in which mzQuality is implemented; used to execute readData, buildExperiment, and verification code)

Examples

path <- system.file("extdata", "example.tsv", package = "mzQuality"); combined <- readData(path); exp <- buildExperiment(combined); ratio_assay <- assay(exp, "ratio"); primary_assay <- assay(exp, "area"); all.equal(ratio_assay, primary_assay)

Evaluation signals

  • When secondaryAssay is not specified, verify that all ratio assay values match primary assay values element-wise (confirms divisor defaults to 1).
  • When secondaryAssay is specified, verify that ratio[i,j] == primary[i,j] / secondary[i,j] for all compounds i and samples j (within numerical tolerance).
  • Confirm that the SummarizedExperiment object contains a 'ratio' key in the assays() slot.
  • Verify that rowData includes compound metadata and colData includes sample metadata with correct dimensions matching the ratio assay matrix.
  • Check that no NA or infinite values appear in the ratio assay unless explicitly expected (e.g., division by zero in secondary assay).

Limitations

  • In the current version of mzQuality, only one sample type can be used for calculating concentrations, which may constrain multi-type studies.
  • The ratio computation assumes the secondary assay (internal standard area) values are positive and non-zero; division by zero or missing values in secondary assay are not explicitly documented.
  • Ratio verification depends on exact floating-point arithmetic; numerical precision differences between software or platforms may introduce small discrepancies requiring tolerance-based comparison rather than exact equality.

Evidence

  • [other] Task 005 finding on default secondary assay behavior: "When secondaryAssay is not provided to buildExperiment, its value defaults to 1, which negates the Internal Standard effect, making the ratio assay equal to the primary assay values."
  • [other] Task 001 finding on ratio computation method: "The function automatically calculates the compound/internal standard ratio for each sample and stores it in the 'ratio' assay, with the ratio computed as primary assay divided by secondary assay (or"
  • [other] Task 001 workflow on SummarizedExperiment construction: "Call buildExperiment on the resulting data frame, specifying column mappings for aliquots (samples), compounds (features), and assay values (area under the curve). Inspect the returned"
  • [readme] README example of buildExperiment usage: "Once your files are ready, you can use the readData function to read in your data. It will check if all mandatory columns are present and if the data is in the correct format. Finally, the function"
  • [readme] README on doAnalysis workflow including ratio calculation: "The doAnalysis function will perform the following steps: 1. Calculate the ratio between the compounds and assigned internal standards,"

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

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.