agentsclimarketplace

Gnps workflow identifier retrieval

Skill HolobiomicsLab/asb-skill-collections/packs/metabolomics/lc-ms/skills/gnps-workflow-identifier-retrieval

Use when when you have a GNPS molecular networking task ID and need to fetch the job archive, decompose it into standard metabolomics file formats (spectra.mgf, molecular_families.tsv, annotations.tsv, file_mappings), and prepare them for integration with genomics data.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill gnps-workflow-identifier-retrieval

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 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

7.3 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

gnps-workflow-identifier-retrieval

Summary

Retrieve and validate GNPS molecular networking job archives by task ID, then extract and standardize constituent files (spectra.mgf, molecular_families.tsv, annotations.tsv, file_mappings) for downstream metabolomics data integration. This skill bridges GNPS data repositories (GNPS1 and GNPS2) into NPLinker's local processing pipeline.

When to use

When you have a GNPS molecular networking task ID and need to fetch the job archive, decompose it into standard metabolomics file formats (spectra.mgf, molecular_families.tsv, annotations.tsv, file_mappings), and prepare them for integration with genomics data. Specifically when the workflow type is one of METABOLOMICS-SNETS, METABOLOMICS-SNETS-V2, FEATURE-BASED-MOLECULAR-NETWORKING (GNPS1) or classical_networking_workflow, feature_based_molecular_networking_workflow (GNPS2).

When NOT to use

  • GNPS data has already been downloaded and extracted into standardized NPLinker file formats
  • You do not have a valid GNPS task ID or the task corresponds to a non-metabolomics GNPS workflow
  • The GNPS job was generated by a workflow type not supported by NPLinker (e.g., custom or third-party networking)

Inputs

  • GNPS task ID (string)
  • local downloads directory path (string)
  • target gnps output directory path (string)

Outputs

  • spectra.mgf (mass spectrometry spectral data)
  • molecular_families.tsv (molecular networking cluster assignments)
  • annotations.tsv (chemical annotations)
  • file_mappings.tsv or file_mappings.csv (sample-to-spectrum mappings)

How to apply

Initialize a GNPSDownloader with your GNPS task ID and a local downloads directory path, then call download() to fetch the job archive and retrieve its file path. Next, initialize a GNPSExtractor with the downloaded archive path and target gnps directory, then call the extraction method to decompress the archive and identify data files based on the detected GNPS workflow type (METABOLOMICS-SNETS, METABOLOMICS-SNETS-V2, FEATURE-BASED-MOLECULAR-NETWORKING for GNPS1, or classical_networking_workflow, feature_based_molecular_networking_workflow for GNPS2). Rename and move extracted files to standardized NPLinker names in the gnps directory. Verify all four required files (spectra.mgf, molecular_families.tsv, annotations.tsv, file_mappings.tsv or file_mappings.csv) are present, accessible, and correctly named before proceeding to data loading.

Related tools

Examples

from nplinker.gnps import GNPSDownloader, GNPSExtractor; dl = GNPSDownloader('task_001', './downloads'); archive_path = dl.download(); ex = GNPSExtractor(archive_path, './gnps'); ex.extract()

Evaluation signals

  • All four required output files (spectra.mgf, molecular_families.tsv, annotations.tsv, file_mappings.tsv/.csv) exist in the target gnps directory with correct naming
  • spectra.mgf contains valid MGF-format mass spectrometry data with m/z and intensity values
  • molecular_families.tsv contains valid TSV entries mapping spectra to GCF (Gene Cluster Family) cluster IDs
  • file_mappings.tsv/.csv correctly links sample/file names to spectrum identifiers
  • No extraction errors or file corruption detected during decompression and format validation

Limitations

  • Only supports GNPS1 (https://gnps.ucsd.edu) and GNPS2 (https://gnps2.org) data; custom or forked GNPS instances may not be recognized
  • Workflow type detection is workflow-name dependent; unsupported workflow types will cause extraction to fail
  • Network connectivity required for GNPSDownloader to reach GNPS repository; offline or air-gapped systems cannot retrieve archives
  • File naming and structure within GNPS archives may vary across workflow versions, potentially requiring updates to extraction logic

Evidence

  • [other] first, GNPSDownloader fetches a GNPS molecular networking job archive and returns its file path; second, GNPSExtractor extracts the archive contents into a designated gnps directory for subsequent data loading operations: "first, GNPSDownloader fetches a GNPS molecular networking job archive and returns its file path; second, GNPSExtractor extracts the archive contents into a designated gnps directory for subsequent"
  • [other] METABOLOMICS-SNETS, METABOLOMICS-SNETS-V2, FEATURE-BASED-MOLECULAR-NETWORKING for GNPS1, or classical_networking_workflow, feature_based_molecular_networking_workflow for GNPS2: "METABOLOMICS-SNETS, METABOLOMICS-SNETS-V2, FEATURE-BASED-MOLECULAR-NETWORKING for GNPS1, or classical_networking_workflow, feature_based_molecular_networking_workflow for GNPS2"
  • [other] Rename and move the extracted files to the standard NPLinker names (spectra.mgf, molecular_families.tsv, annotations.tsv, file_mappings.tsv or file_mappings.csv) in the gnps directory: "Rename and move the extracted files to the standard NPLinker names (spectra.mgf, molecular_families.tsv, annotations.tsv, file_mappings.tsv or file_mappings.csv) in the gnps directory"
  • [other] Verify that all four required files are present and accessible in the gnps directory with correct naming and format: "Verify that all four required files are present and accessible in the gnps directory with correct naming and format"
  • [other] currently accepts data from both GNPS1 (https://gnps.ucsd.edu) and GNPS2 (https://gnps2.org) workflows: "currently accepts data from both GNPS1 (https://gnps.ucsd.edu) and GNPS2 (https://gnps2.org) workflows"

What ships with it

Read from the repository

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

Keep looking

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