agentsclimarketplace

Peak recovery from filtered candidates

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/peak-recovery-from-filtered-candidates

Use when after applying cluster-based filtering with quasi-molecular adducts and frequency thresholds on candidate metabolites from KEGG matching.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill peak-recovery-from-filtered-candidates

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

peak-recovery-from-filtered-candidates

License: restricted — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution. <!-- asb-license-banner -->

Summary

Recover LC-MS peaks that were completely removed during cluster-based filtering to prevent loss of potentially valid metabolite annotations. This skill reconstructs a complete peak inventory before final diffusion-based ranking, ensuring no valid candidates are discarded by conservative filtering thresholds.

When to use

After applying cluster-based filtering with quasi-molecular adducts and frequency thresholds on candidate metabolites from KEGG matching. Use this skill when you need to preserve annotation completeness despite aggressive filtering that may have removed entire peak features due to low observed frequency or non-standard adduct assignments.

When NOT to use

  • Input peak table is already fully annotated or contains no filtered-out features
  • Filtering stage was not applied or filtering criteria retained all candidate peaks
  • Recovery strategy conflicts with downstream analysis requiring strict frequency-based confidence cutoffs

Inputs

  • filtered_candidates (output from clusterBased.filter)
  • original_peak_candidate_assignments (pre-filter peak–KEGG compound mappings)
  • diffusion_results (output from set.diffusion with z-score normalization)

Outputs

  • recovered_peaks (reconstructed peak–compound associations)
  • merged_ranked_table (diffusion-prioritized peaks plus recovered peaks, ranked by Ranked.Tab)

How to apply

Apply the recoveringPeaks function to reconstruct peaks that were completely eliminated by the cluster-based filter step. This function compares the filtered candidate pool against the original unfiltered peak-candidate assignments to identify and recover removed peaks. The recovered peaks are then merged with diffusion-prioritized results by compound identifier before final ranking, ensuring that peaks removed by conservative filtering criteria (e.g., frequency thresholds below 0.1 or rare adduct forms) are restored to the annotation table. This recovery occurs after z-score normalization of diffusion scores but before the final ranking step via the finalResults function.

Related tools

  • mWISE (Provides the recoveringPeaks function to restore completely filtered peaks and finalResults function to merge recovered peaks with diffusion-ranked results) — https://dev.b2s.club/b2slab/mWISE
  • R (Host language for executing recoveringPeaks and finalResults functions)
  • FELLA (Provides the metabolite network graph (sample.graph) used to compute diffusion scores that are merged with recovered peaks)

Examples

recoveringPeaks(filteredCandidates = clusterBased.filter(...), originalPeakTable = peakCandidates); finalResults(diffusionResults, recoveredPeaks, scores='z')

Evaluation signals

  • Recovered peaks are identifiable by comparing row counts: (filtered candidates + recovered peaks) ≥ (original pre-filter candidates)
  • All recovered peaks have valid compound identifiers matching KEGG database entries used in diffusion input
  • Merged final table contains no duplicate peak–compound pairs after recovery and diffusion merge by compound identifier
  • Peaks recovered are those with low observed frequency or non-standard adducts that were excluded by clusterBased.filter thresholds but not by mass accuracy constraints
  • Final Ranked.Tab output includes all recovered peaks ranked by z-score-normalized diffusion scores, with no NAs introduced by the recovery step

Limitations

  • Recovery reconstructs peaks removed by filtering but cannot restore confidence in their metabolite assignment beyond what the diffusion network provides
  • Peaks with conflicting or ambiguous compound annotations may be recovered multiple times (one per compound), requiring downstream deduplication logic
  • Recovery strategy assumes the original unfiltered peak–candidate assignment table is available and correctly preserved; partial or corrupted filtering history may yield incomplete recovery

Evidence

  • [intro] The recoveringPeaks function recovers the peaks that have been completely removed by the cluster-based filter.: "The recoveringPeaks function recovers the peaks that have been completely removed by the cluster-based filter."
  • [intro] (4) merging the recovered peaks with diffusion results by compound identifier; and (5) building a final ranked table using finalResults function with z-score normalization.: "merging the recovered peaks with diffusion results by compound identifier; and (5) building a final ranked table using finalResults function"
  • [intro] Recover peaks completely removed by cluster-based filtering using the recoveringPeaks function.: "Recover peaks completely removed by cluster-based filtering using the recoveringPeaks function."
  • [intro] Compile and rank final results using the finalResults function to generate the diffusion-prioritized Ranked.Tab output.: "Compile and rank final results using the finalResults function to generate the diffusion-prioritized Ranked.Tab output."

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.