agentsclimarketplace

Numerical equivalence testing

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/numerical-equivalence-testing

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 numerical-equivalence-testing

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 you need to confirm that omitting an optional input parameter (such as secondaryAssay in buildExperiment) produces the expected mathematical result—specifically, when a default value should neutralize a transformation (e.

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

numerical-equivalence-testing

Summary

Verify that two numerical assays or derived quantities are element-wise identical or functionally equivalent by comparing their values across all observations. This skill is essential when testing default parameter behaviors or validating that mathematical transformations (e.g., division by 1) leave data unchanged.

When to use

Apply this skill when you need to confirm that omitting an optional input parameter (such as secondaryAssay in buildExperiment) produces the expected mathematical result—specifically, when a default value should neutralize a transformation (e.g., an internal standard divisor of 1 making the ratio assay equal to the primary assay). Use it to validate assumptions about default behavior before proceeding with downstream analyses that depend on those defaults.

When NOT to use

  • Input data already has a secondary assay explicitly specified; equivalence testing is not meaningful when both numerator and denominator are intentionally distinct.
  • The expected behavior is that ratio assay should differ from primary assay (e.g., when internal standard normalization is the intended operation).
  • Assays contain missing or NaN values that would invalidate direct element-wise comparison without imputation or masking logic.

Inputs

  • tab-delimited metabolomics data file (e.g., example.tsv from mzQuality package)
  • SummarizedExperiment object with primary assay and optional secondary assay slots

Outputs

  • validation report confirming element-wise equality across compound–sample pairs
  • boolean matrix or logical summary indicating which assay pairs pass equivalence test

How to apply

Load the input data using readData (which performs basic integrity checks on column structure), then call buildExperiment without the optional secondary assay parameter to generate a SummarizedExperiment object. Extract the 'ratio' assay from the resulting experiment object and the primary assay values separately. Perform element-wise comparison across all compound–sample pairs to verify that ratio values equal primary assay values, confirming that the default internal standard divisor of 1 has negated the normalization effect. Generate a validation report documenting the equality check outcome for all observations.

Related tools

Examples

path <- system.file('extdata', 'example.tsv', package = 'mzQuality'); exp <- buildExperiment(readData(path)); all.equal(assay(exp, 'ratio'), assay(exp, 'primary'))

Evaluation signals

  • All ratio assay values are numerically identical (or differ only by floating-point rounding error ≤ machine epsilon) to primary assay values across all compound–sample pairs.
  • Validation report documents the count and percentage of observations passing equivalence test, with 100% pass rate indicating correct default behavior.
  • No NaN, Inf, or missing values appear in the comparison result when input data is complete; presence of such values flags data quality issues.
  • Repeating the test with an explicitly specified secondaryAssay parameter = 1 produces identical outcome, confirming equivalence of default and explicit divisor.
  • Element-wise difference matrix (ratio - primary) contains only zeros or values within machine epsilon tolerance (e.g., < 1e-15 for double precision).

Limitations

  • Floating-point arithmetic may introduce rounding errors; exact equality testing must account for machine epsilon tolerance rather than strict zero difference.
  • This validation assumes the primary assay contains no missing or NaN values; presence of such values will cause element-wise comparison to produce NA or FALSE results that mask the true default behavior.
  • The secondaryAssay default value of 1 is specific to mzQuality's buildExperiment function; other tools or functions may have different or no defaults, making the equivalence test inapplicable.
  • Test is limited to the specific case where secondaryAssay is omitted entirely; partial or conditional specification of secondary assay parameters may not follow the documented default.

Evidence

  • [other] Default internal standard divisor 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] Workflow for validation testing: "Load the example.tsv file from the mzQuality package using readData function, which performs basic checks on column integrity. Call buildExperiment on the resulting data frame without specifying a"
  • [other] Validation report generation: "Generate a validation report confirming equality across all compound–sample pairs."
  • [readme] buildExperiment function and SummarizedExperiment usage: "The function buildExperiment allows you to create a SummarizedExperiment object from a data frame by specifying the following columns"
  • [readme] Data import and integrity checking: "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."

What ships with it

Read from the repository

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

Keep looking

Skills are one crate of 326,984. 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.