Structural representation format detection
Use when when you have a mixed-format input query that may contain a compound identifier and a structural representation separated by a tab delimiter, and you need to determine which ClassyFire API endpoint (SMILES, InChI, IUPAC, or FASTA) to submit the query to for chemical classification.From its SKILL.md
npx -y skills add HolobiomicsLab/asb-skill-collections --skill structural-representation-format-detectionAssembled 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.4 KB, 951 tokens by cl100k_base, as published. Nobody here has run it
structural-representation-format-detection
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
Detect and classify chemical structure input formats (SMILES, InChI, IUPAC name, or FASTA) from query strings to enable correct routing to ClassyFire API endpoints. This skill disambiguates among multiple structural representation syntaxes so that downstream classification requests are submitted to the correct endpoint.
When to use
When you have a mixed-format input query that may contain a compound identifier and a structural representation separated by a tab delimiter, and you need to determine which ClassyFire API endpoint (SMILES, InChI, IUPAC, or FASTA) to submit the query to for chemical classification.
When NOT to use
- Input is a pre-classified compound that has already been submitted to ClassyFire and returned a result.
- Input is a single structure format known in advance (e.g. you are certain all inputs are SMILES); direct submission without detection overhead is more efficient.
- Input lacks a structural representation component or is malformed such that tab-delimited parsing fails.
Inputs
- query input string (tab-delimited: optional compound identifier + structural representation)
- structural representation (one of: Daylight SMILES, InChI string, IUPAC name, FASTA sequence)
Outputs
- dispatched request object
- API response from ClassyFire endpoint
- classification result for the submitted chemical compound
How to apply
Parse the input query string by splitting on the tab delimiter to extract an optional compound identifier and the structural representation. Apply pattern matching against format-specific syntax rules: SMILES syntax rules (Daylight format), InChI prefix conventions, FASTA format indicators (sequence headers and codes), and IUPAC nomenclature patterns. Classify the detected format and dispatch the parsed query to the corresponding ClassyFire API endpoint using the REST-client gem via POST method with the appropriate parameter key for that structure type. Return the dispatched request object or API response for downstream processing.
Related tools
- rest-client gem (HTTP client library for submitting POST requests to ClassyFire API endpoints with the detected parameter key)
- Ruby (Programming language environment in which to parse input query strings, apply format detection logic, and orchestrate API calls)
- ClassyFire API (Target REST API that accepts routed queries for automatic chemical compound classification based on structure) — bitbucket.org/wishartlab/classyfire_api
Evaluation signals
- Query string is successfully split on tab delimiter into compound identifier (if present) and structural representation.
- Pattern matching correctly classifies the structural representation into one of the four formats (SMILES, InChI, IUPAC, FASTA) with no misclassification.
- The correct ClassyFire API endpoint parameter key is selected and used in the POST request body.
- API response is received without 400/422 errors indicating malformed parameter keys or incompatible format submission.
- Returned classification result is chemically plausible for the submitted structure (e.g., compound class, chemical ontology hierarchy is populated).
Limitations
- IUPAC nomenclature patterns are complex and context-dependent; some systematic IUPAC names may not be reliably distinguished from free-text input without additional heuristics.
- Ambiguous or malformed inputs (e.g., truncated SMILES, incomplete InChI strings) may lead to misclassification and failed API submission.
- FASTA format detection relies on header and sequence code conventions; non-standard FASTA variants may not be recognized.
- No changelog or version tracking documented for the ClassyFire API, so format changes or new accepted structures may not be immediately discoverable.
Evidence
- [other] Parse input query string; detect structural representation type; dispatch to appropriate endpoint: "Parse the input query string to extract the optional compound identifier and structural representation, splitting on tab delimiter. Detect the structural representation type by pattern matching"
- [intro] ClassyFire API accepts tab-delimited input with multiple format types: "The ClassyFire API accepts query input consisting of an optional compound identifier and structural representation separated by a tab, with the structural representation dispatched according to its"
- [intro] POST method submission via REST-client gem: "submitting via POST method with the appropriate parameter key for the detected structure type"
- [intro] ClassyFire enables chemical classification from structure: "ClassyFire is a resource that allows you to automatically classify any chemical compound based on its structure"
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.