agentsclimarketplace

Compound query formatting

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/compound-query-formatting

Use when you have a set of chemical compounds (identified by name, SMILES, InChI, or other standard identifier) that you need to classify using ClassyFire, and you must prepare them as a single batch query body for the submit_query POST request.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill compound-query-formatting

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

compound-query-formatting

License: noncommercial — confirm your use is a permitted (noncommercial) purpose before applying; commercial use requires a separate license (see metadata.tool_license). <!-- asb-license-banner -->

Summary

Format chemical compound identifiers and structural representations into tab-separated newline-delimited input for submission to the ClassyFire API POST endpoint. This skill ensures compounds are correctly serialized for batch classification queries.

When to use

You have a set of chemical compounds (identified by name, SMILES, InChI, or other standard identifier) that you need to classify using ClassyFire, and you must prepare them as a single batch query body for the submit_query POST request.

When NOT to use

  • Compounds are already stored in a ClassyFire query and you only need to retrieve results (use result polling instead).
  • You are submitting a single compound query with immediate result retrieval (consider alternative endpoints if available).
  • Your compounds lack valid structural representation or identifiers that ClassyFire recognizes.

Inputs

  • List of compound identifiers (strings)
  • List of chemical structure representations (SMILES, InChI, or IUPAC names)
  • Query label (string)

Outputs

  • Tab-separated newline-delimited compound query string (formatted request body)
  • HTTP POST request to ClassyFire submit_query endpoint
  • JSON response containing query ID and status

How to apply

Construct a query body by creating one line per compound, where each line contains a unique compound identifier (or label), followed by a tab character, followed by the chemical structure representation in SMILES, InChI, or IUPAC name format. Separate lines with newlines. Assign a descriptive query label to the entire batch. Pass this formatted string as the request body to the ClassyFire API submit_query POST endpoint using rest-client or equivalent HTTP client. The server will respond with a JSON object containing a query ID and initial status; parse this response to retrieve the query ID for downstream polling.

Related tools

  • rest-client (HTTP client library for constructing and executing the POST request to ClassyFire API)
  • ClassyFire API (Target API endpoint for receiving formatted compound queries and returning classification results) — bitbucket.org/wishartlab/classyfire_api
  • Ruby (Programming environment for loading rest-client gem and executing the formatted query submission)

Examples

require 'rest-client'; body = "aspirin\tCC(=O)Oc1ccccc1C(=O)O\nibuprofen\tCC(C)Cc1ccc(cc1)C(C)C(=O)O"; response = RestClient.post('http://classyfire.wishartlab.com/queries', body, {params: {label: 'my_compounds'}}); puts response

Evaluation signals

  • Each line in the query body contains exactly one tab character separating identifier and structure.
  • Lines are separated by newlines with no extra whitespace or blank lines between compounds.
  • All structure representations conform to SMILES, InChI, or IUPAC name syntax (validated by ClassyFire accept/reject response).
  • HTTP response status is 200 or 201 and contains a valid JSON object with 'query_id' and 'status' fields.
  • Query ID returned can be used in subsequent polling requests to retrieve classification results without error.

Limitations

  • ClassyFire API may reject queries with invalid or unrecognized structure formats; ensure SMILES/InChI are well-formed.
  • Batch size limits are not documented in the provided source; very large compound sets may need to be split into multiple queries.
  • Tab-separated format is rigid; any embedded tabs in identifiers or structures will break line parsing.

Evidence

  • [other] The submit_query method accepts a query label and tab-separated compound inputs (identifier and structural representation) separated by newlines: "The submit_query method accepts a query label and tab-separated compound inputs (identifier and structural representation) separated by newlines, formatted as individual lines where each line"
  • [other] Construct a POST request with query label and tab-separated compound inputs: "Construct a POST request to the ClassyFire API submit_query endpoint with a query label and tab-separated compound inputs separated by newlines as the request body."
  • [other] Execute the HTTP POST call and capture the JSON response containing the query ID and status: "Execute the HTTP POST call and capture the JSON response containing the query ID and status."
  • [intro] ClassyFire is a resource that allows you to automatically classify any chemical compound based on its structure: "ClassyFire is a resource that allows you to automatically classify any chemical compound based on its structure"
  • [intro] A query can be submitted using the POST method: "A query can be submitted using the POST method"

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.