agentsclimarketplace

Filter output interpretation

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v1/skills/filter-output-interpretation

Use when after applying a filter function (filter_mispicked_ions(), filter_group(), filter_cv(), filter_insource_ions()) to an mpactr object, use this skill to inspect and document which features were retained versus removed.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill filter-output-interpretation

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

5.8 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it

filter-output-interpretation

Summary

Extract and interpret the named list structure returned by filter_summary() to understand which ions passed or failed a specific filter (e.g., mispicked, group, cv, insource). This skill enables systematic review of filter results, conversion to tabular format, and export for downstream analysis.

When to use

After applying a filter function (filter_mispicked_ions(), filter_group(), filter_cv(), filter_insource_ions()) to an mpactr object, use this skill to inspect and document which features were retained versus removed. Trigger this when you need to validate filter decisions, audit feature loss, or prepare filtered results for publication or further statistical analysis.

When NOT to use

  • Filter has not yet been applied to the mpactr object (call the filter function first, e.g., filter_mispicked_ions())
  • You only need a count summary; filter_summary() returns detailed ion-level data, not aggregated statistics
  • Input is not an mpactr object (e.g., a raw peak table or external feature list)

Inputs

  • filtered mpactr object (R6 reference class with in-place updated state)
  • filter name string ('mispicked', 'group', 'cv', or 'insource')

Outputs

  • named list with 'failed_ions' and 'passed_ions' vectors
  • data.table(s) with compound identifiers and filter status columns
  • CSV export files documenting ion fate per filter

How to apply

Call filter_summary(data_object, filter_name) where filter_name is one of 'mispicked', 'group', 'cv', or 'insource'. This returns a named list with two components: failed_ions (those removed by the filter) and passed_ions (those retained). Convert each vector to a data.table by adding compound identifier and filter status columns using data.table operations. Use head() to inspect subset of records before exporting both tables to CSV format for validation, visualization, or integration into downstream metabolomics workflows. The rationale is that documenting filter decisions—which features were removed and why—is essential for reproducing analysis decisions and understanding feature loss across filter stages.

Related tools

  • mpactr (R package providing filter_summary() function and R6 mpactr class for in-place filtering and output interpretation) — https://github.com/mums2/mpactr
  • data.table (R package for converting ion vectors to tabular format and exporting filtered results to CSV)
  • R (Language and runtime for executing filter_summary() calls and data transformation pipelines)

Examples

filter_summary(mpactr_object, 'mispicked')

Evaluation signals

  • filter_summary() returns a named list with exactly two components: 'failed_ions' and 'passed_ions'
  • Sum of lengths of failed_ions and passed_ions equals total number of input features before filtering
  • Data.table conversion preserves all ion identifiers and adds filter status column with consistent values ('failed' or 'passed')
  • CSV exports contain no missing values in compound identifier or filter status columns
  • head() output shows expected number of rows (default 6) and matches ion names and status in full tables

Limitations

  • filter_summary() only returns results for the single most recently applied filter; sequential application of multiple filters requires calling filter_summary() after each filter step to track cumulative feature loss
  • Ion identifiers depend on input peak table structure and naming conventions; mismatches or special characters may affect downstream parsing or export
  • No built-in visualization; practitioners must construct plots (e.g., via ggplot2) to display filter funnel or Upset diagrams across multiple filters

Evidence

  • [methods] filter_summary() returns a named list containing two components: failed_ions and passed_ions: "filter_summary() returns a named list containing two components: failed_ions and passed_ions, both of which can be displayed as data tables using head()"
  • [methods] Convert each vector to a data.table with compound identifiers and filter status columns, then export to CSV: "Convert each vector to a data.table with compound identifiers and filter status columns. 4. Export both tables to CSV format for downstream analysis or visualization."
  • [readme] All filters are independent and can be combined into a project-specific workflow: "All filters are independent, meaning they can be used to create a project-specific workflow"
  • [readme] Available filter types: mispicked, group, cv, insource: "filter_mispicked_ions(): removal of mispicked peaks, or those isotopic patterns that are incorrectly split during preprocessing. filter_group(): removal of features overrepresented in a specific"
  • [methods] R6 reference semantics enable in-place data updates without copying the entire object: "operates on reference semantics in which data is updated in-place. Compared to a shallow copy, where only data pointers are copied, or a deep copy, where the entire data object is copied in memory"

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.