compound-identifier-extraction
License: noncommercial — confirm your use is a permitted (noncommercial) purpose before applying; commercial use requires a separate license (see metadata.tool_license).
Summary
Extract and separate optional compound identifiers from structural representation strings in chemical query inputs. This skill enables routing of multi-format chemical data (SMILES, InChI, IUPAC name, FASTA) by first isolating metadata from structure.
When to use
When you receive a raw query string destined for the ClassyFire API and need to distinguish between a user-supplied compound identifier (e.g., a database accession or common name) and the actual chemical structure representation (SMILES, InChI, IAPNIC name, or FASTA sequence). Apply this skill before attempting structure format detection or API dispatch.
When NOT to use
- Input is already pre-parsed or originated from a structured database field with identifier and structure stored separately
- The delimiter convention for your workflow uses a character other than tab (e.g., comma, pipe, or space)
Inputs
- Query string with optional tab-delimited compound identifier and structural representation
Outputs
- Compound identifier (string or nil)
- Structural representation (string: SMILES, InChI, IUPAC name, or FASTA sequence)
How to apply
Split the input query string on a tab delimiter to separate the optional compound identifier from the structural representation. The compound identifier is optional and appears first; if only one field is present, the entire string is the structural representation with no identifier. Retain both components for downstream dispatch and annotation: the identifier is used for result tracking and compound reference, while the structural representation is routed to the appropriate ClassyFire API endpoint based on its format. This two-stage parsing (extraction first, then format detection) ensures that classification results can be reliably mapped back to the original query.
Related tools
Evaluation signals
- Tab-delimited input consistently splits into exactly two fields (or one if no identifier present)
- Extracted compound identifier is a non-empty string (or nil/empty when absent) and does not contain tab or newline characters
- Structural representation field contains one of the expected syntax patterns (SMILES, InChI prefix, FASTA format indicator, or IUPAC-like nomenclature) suitable for downstream format detection
- When re-joined on tab (if identifier is present), the original input string is recovered
- Downstream format detection and API dispatch succeed using the extracted structural representation
Limitations
- If the compound identifier itself legitimately contains tab characters, this parsing strategy will fail; alternative delimiters or escape conventions would be needed
- No validation of identifier format or content is performed; malformed or oversized identifiers pass through to the API, which may reject them
- If the input uses a different delimiter convention (e.g., comma or pipe) instead of tab, extraction will fail silently and misinterpret the input as structure-only
Evidence
- [other] The ClassyFire API accepts query input consisting of an optional compound identifier and structural representation separated by a tab: "The ClassyFire API accepts query input consisting of an optional compound identifier and structural representation separated by a tab"
- [other] Parse the input query string to extract the optional compound identifier and structural representation, splitting on tab delimiter.: "Parse the input query string to extract the optional compound identifier and structural representation, splitting on tab delimiter"
- [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"
1---2name: compound-identifier-extraction3description: Use when when you receive a raw query string destined for the ClassyFire API and need to distinguish between a user-supplied compound identifier (e.g., a database accession or common name) and the actual chemical structure representation (SMILES, InChI, IAPNIC name, or FASTA sequence).4license: CC-BY-4.05---67# compound-identifier-extraction89> **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 -->10## Summary1112Extract and separate optional compound identifiers from structural representation strings in chemical query inputs. This skill enables routing of multi-format chemical data (SMILES, InChI, IUPAC name, FASTA) by first isolating metadata from structure.1314## When to use1516When you receive a raw query string destined for the ClassyFire API and need to distinguish between a user-supplied compound identifier (e.g., a database accession or common name) and the actual chemical structure representation (SMILES, InChI, IAPNIC name, or FASTA sequence). Apply this skill before attempting structure format detection or API dispatch.1718## When NOT to use1920- Input is already pre-parsed or originated from a structured database field with identifier and structure stored separately21- The delimiter convention for your workflow uses a character other than tab (e.g., comma, pipe, or space)2223## Inputs2425- Query string with optional tab-delimited compound identifier and structural representation2627## Outputs2829- Compound identifier (string or nil)30- Structural representation (string: SMILES, InChI, IUPAC name, or FASTA sequence)3132## How to apply3334Split the input query string on a tab delimiter to separate the optional compound identifier from the structural representation. The compound identifier is optional and appears first; if only one field is present, the entire string is the structural representation with no identifier. Retain both components for downstream dispatch and annotation: the identifier is used for result tracking and compound reference, while the structural representation is routed to the appropriate ClassyFire API endpoint based on its format. This two-stage parsing (extraction first, then format detection) ensures that classification results can be reliably mapped back to the original query.3536## Related tools3738- **rest-client gem** (Ruby HTTP client for dispatching parsed queries to ClassyFire API via POST after identifier extraction) — https://bitbucket.org/wishartlab/classyfire_api3940## Evaluation signals4142- Tab-delimited input consistently splits into exactly two fields (or one if no identifier present)43- Extracted compound identifier is a non-empty string (or nil/empty when absent) and does not contain tab or newline characters44- Structural representation field contains one of the expected syntax patterns (SMILES, InChI prefix, FASTA format indicator, or IUPAC-like nomenclature) suitable for downstream format detection45- When re-joined on tab (if identifier is present), the original input string is recovered46- Downstream format detection and API dispatch succeed using the extracted structural representation4748## Limitations4950- If the compound identifier itself legitimately contains tab characters, this parsing strategy will fail; alternative delimiters or escape conventions would be needed51- No validation of identifier format or content is performed; malformed or oversized identifiers pass through to the API, which may reject them52- If the input uses a different delimiter convention (e.g., comma or pipe) instead of tab, extraction will fail silently and misinterpret the input as structure-only5354## Evidence5556- [other] The ClassyFire API accepts query input consisting of an optional compound identifier and structural representation separated by a tab: "The ClassyFire API accepts query input consisting of an optional compound identifier and structural representation separated by a tab"57- [other] Parse the input query string to extract the optional compound identifier and structural representation, splitting on tab delimiter.: "Parse the input query string to extract the optional compound identifier and structural representation, splitting on tab delimiter"58- [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"