agentsclimarketplace

Multiple testing correction bonferroni

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v1/skills/multiple-testing-correction-bonferroni

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 multiple-testing-correction-bonferroni

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 when you have computed raw p-values for multiple independent statistical tests (e.g., Pearson correlation tests across all pairwise ion combinations in MSI data) and need to report which results remain significant after accounting for multiple comparisons.

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

Multiple-testing correction (Bonferroni)

Summary

Apply Bonferroni correction to control false-positive rate when testing statistical significance across many pairwise comparisons in mass spectrometry imaging data. This correction adjusts p-value thresholds by the total number of tests performed, protecting against spurious findings when screening thousands of ion-pair correlations.

When to use

When you have computed raw p-values for multiple independent statistical tests (e.g., Pearson correlation tests across all pairwise ion combinations in MSI data) and need to report which results remain significant after accounting for multiple comparisons. Bonferroni is appropriate when the number of tests is moderate (hundreds to low thousands) and you can afford conservative significance thresholds.

When NOT to use

  • When you have performed only a single or very few hypothesis tests—Bonferroni correction is overly conservative and unnecessary for small test counts.
  • When test results are not independent (e.g., correlated ion pairs)—Bonferroni assumes independence and will be too stringent under positive correlation.
  • When you wish to control false-discovery rate (FDR) rather than family-wise error rate—use Benjamini–Hochberg or similar FDR methods instead.

Inputs

  • massdiff object (annotated ion pairs with raw p-values from correlation tests)
  • number of statistical tests performed (typically implicit in massdiff object length)
  • significance threshold (default α = 0.05)

Outputs

  • massdiff object with Bonferroni-corrected Significance field (boolean)
  • p-value threshold after correction (α / number of tests)
  • subset of ion pairs meeting corrected significance

How to apply

After computing raw p-values for each pairwise correlation test (e.g., via corrPairsMSI()), apply Bonferroni correction by dividing the significance threshold (typically α = 0.05) by the total number of tests performed. A result is considered significant if its raw p-value is less than α / (number of tests). The mass2adduct package applies this correction automatically in corrPairsMSI(), returning a boolean Significance field that indicates whether each ion pair meets the Bonferroni-corrected threshold. Report both raw p-values and the corrected significance status in results to allow downstream filtering and interpretation.

Related tools

Examples

d.diff.annot.cor <- corrPairsMSI(d, d.diff.annot); # Returns massdiff object with raw P.value and Bonferroni-corrected Significance fields

Evaluation signals

  • Corrected significance threshold = α / (total number of ion pairs tested). Verify this calculation matches the reported threshold.
  • All Significance boolean values in output massdiff object should be FALSE for raw p-values ≥ corrected threshold; TRUE only for raw p-values < corrected threshold.
  • Raw p-values and corrected Significance field should both be present in output, allowing manual verification of correction logic.
  • The number of significant ion pairs after correction should be substantially lower than before correction, reflecting the stringency of family-wise error control.
  • Bonferroni-corrected results should be reproducible: identical inputs and parameters must yield identical Significance assignments across runs.

Limitations

  • Bonferroni correction is conservative, especially when the number of tests is large (thousands or more), and may fail to detect true signals.
  • The correction assumes independence between tests; ion-pair correlations in MSI data may violate this assumption, leading to over-correction.
  • For very large datasets (hundreds of thousands of ion pairs), the corrected significance threshold becomes extremely stringent, potentially yielding zero or very few significant results.
  • The package applies Bonferroni correction at default α = 0.05 by default; custom thresholds may require manual adjustment of results post-hoc.

Evidence

  • [other] This performs a correlation test (by default two-tailed with Pearson's method) on each pair of peaks in the massdiff object.: "This performs a correlation test (by default two-tailed with Pearson's method) on each pair of peaks in the massdiff object."
  • [other] Extract and report correlation Estimate, raw P.value, and Bonferroni-corrected Significance (boolean) fields in the output massdiff object.: "Extract and report correlation Estimate, raw P.value, and Bonferroni-corrected Significance (boolean) fields in the output massdiff object."
  • [readme] By default the cutoff for significance is p=0.05 with Bonferroni correction.: "By default the cutoff for significance is p=0.05 with Bonferroni correction."
  • [readme] Output is a data.frame with p-values for each ion pair. By default the cutoff for significance is p=0.05 with Bonferroni correction.: "Output is a data.frame with p-values for each ion pair. By default the cutoff for significance is p=0.05 with Bonferroni correction."

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.