agentsclimarketplace

Chemical structure deduplication

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/chemical-structure-deduplication

Use when after applying biotransformation rules to generate candidate product structures from input molecules, when the same transformed structure can be produced via multiple transformation pathways or rule applications, and you need a single canonical representation while tracking which rules and.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill chemical-structure-deduplication

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

chemical-structure-deduplication

License: restricted — no clear open-source license detected for the underlying tool; verify licensing before commercial use or redistribution. <!-- asb-license-banner -->

Summary

Deduplicate transformed molecular structures generated by biotransformation rule application, eliminating redundant candidates while preserving parent–product relationships. This skill ensures a non-redundant candidate pool for downstream molecular structure annotation in untargeted metabolomics.

When to use

After applying biotransformation rules to generate candidate product structures from input molecules, when the same transformed structure can be produced via multiple transformation pathways or rule applications, and you need a single canonical representation while tracking which rules and parent structures generated each product.

When NOT to use

  • Input structures have not yet been transformed by biotransformation rules—deduplication is a post-transformation step, not an input validation step.
  • You require stereochemistry-aware deduplication and canonical SMILES loses stereochemical information critical to your analysis.
  • Parent–product traceability is not important for your use case and you only need a unique set of structures without derivation history.

Inputs

  • List of transformed molecular structures with SMILES strings
  • Applied rule identifiers for each transformation
  • Parent–product relationship metadata
  • Original input SMILES for each product

Outputs

  • Deduplicated structure collection in JSON or CSV format
  • Mapping of unique product SMILES to multiple derivation pathways
  • Consolidated metadata containing original SMILES, all applicable rule identifiers, product SMILES, and transformation metadata

How to apply

Following biotransformation rule application via RDKit, collect all generated product structures with their associated metadata (original SMILES, applied rule identifier, product SMILES). Canonicalize each product SMILES string using RDKit to ensure consistent representation regardless of input ordering or derivation pathway. Group products by their canonical SMILES and merge entries, consolidating the list of parent structures and rule identifiers that produced each unique product. The deduplication maintains the parent–product relationships as a structured mapping rather than discarding alternative derivation paths, allowing downstream ranking or evaluation steps to leverage evidence from multiple biotransformation rules.

Related tools

  • RDKit (Parse, validate, and canonicalize SMILES strings; implement deduplication logic via canonical structure representation)
  • HassounLab/BAM (Framework implementing biotransformation rule application and structure deduplication as part of the full molecular structure discovery pipeline) — https://github.com/HassounLab/BAM

Evaluation signals

  • All deduplicated product SMILES are unique when canonicalized; no two entries share identical canonical SMILES.
  • Cardinality check: number of deduplicated unique products ≤ total number of transformation outputs before deduplication.
  • Parent–product traceability is preserved: each deduplicated product record contains the complete list of rule identifiers and original parent structures that generated it.
  • Serialized output (JSON or CSV) is well-formed and contains no malformed SMILES entries; RDKit can parse 100% of output SMILES strings without errors.
  • Spot-check: manually confirm that products generated by different rules from the same parent are merged into a single entry with multiple rule identifiers listed, not as separate rows.

Limitations

  • Canonical SMILES representation may lose stereochemical information; if stereoisomers are biochemically distinct, additional stereochemistry-aware deduplication logic is required.
  • RDKit's canonicalization depends on SMILES input validity; malformed or non-standard SMILES strings may fail to canonicalize or may canonicalize inconsistently.
  • Deduplication is exact (canonical string matching); near-duplicate structures (e.g., tautomers, protonation states) are not merged and require additional chemical reasoning to handle.
  • Parent–product mapping scales linearly in memory and storage with the number of derivation pathways; very large transformation spaces with many redundant products may require iterative or streaming deduplication.

Evidence

  • [other] Collect and deduplicate the transformed structures, maintaining parent–product relationships.: "Collect and deduplicate the transformed structures, maintaining parent–product relationships."
  • [other] Serialize the results as a structured output file (JSON or CSV) containing original SMILES, applied rule identifier, product SMILES, and transformation metadata.: "Serialize the results as a structured output file (JSON or CSV) containing original SMILES, applied rule identifier, product SMILES, and transformation metadata."
  • [other] Parse and validate each SMILES string using RDKit to ensure chemical validity.: "Parse and validate each SMILES string using RDKit to ensure chemical validity."
  • [other] Apply each biotransformation rule to every input structure, generating candidate product structures according to the rule definitions.: "Apply each biotransformation rule to every input structure, generating candidate product structures according to the rule definitions."

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.