agentsclimarketplace

Data deduplication

Skill HolobiomicsLab/asb-skill-collections/collections/metabolomics/v2/skills/data-deduplication

Use when after parsing and validating a .csv file containing comma-separated SMILES strings, and before formatting the molecule list for CypReact input.From its SKILL.md

Install
npx -y skills add HolobiomicsLab/asb-skill-collections --skill data-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

5.6 KB, 913 tokens by cl100k_base, as published. Nobody here has run it

data-deduplication

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

Summary

Remove duplicate molecular structures from a parsed dataset of SMILES strings before submission to CypReact. Deduplication ensures that redundant molecules are not processed multiple times, reducing computational overhead and preventing inflated result sets.

When to use

After parsing and validating a .csv file containing comma-separated SMILES strings, and before formatting the molecule list for CypReact input. This is essential when the source file may contain repeated SMILES representations of the same molecule, which would otherwise result in duplicate predictions across CYP isoforms.

When NOT to use

  • The input SMILES file has already been deduplicated by the source provider (e.g., curated database with unique entries)
  • Isobaric or stereoisomeric variants are intended to be retained as separate entries in the CypReact analysis
  • The workflow requires tracking all occurrences (e.g., for epidemiological or frequency-weighted analyses)

Inputs

  • Parsed SMILES dataset (pandas DataFrame or JSON object)
  • Validated SMILES strings with metadata fields
  • Molecule identifier or index column (optional)

Outputs

  • Deduplicated SMILES dataset (CSV or JSON format)
  • Deduplicated molecule count and metadata
  • Deduplication report (optional: list of removed duplicates)

How to apply

Load the validated SMILES dataset into a pandas DataFrame or equivalent structure. Identify duplicate SMILES strings using exact string matching (case-sensitive) or canonical SMILES normalization via RDKit to account for alternative notation of the same structure. Remove duplicates while preserving the first occurrence or a representative entry with associated metadata. Optionally, track and log the number and identities of removed duplicates for quality-control reporting. Output the deduplicated molecule list in the same structured format (DataFrame or JSON) compatible with CypReact input specifications.

Related tools

  • RDKit (Validate SMILES syntax and normalize to canonical form for comparison-based deduplication)
  • pandas (Load CSV, perform duplicate detection via drop_duplicates(), and export deduplicated DataFrame)
  • CypReact (Accepts deduplicated .csv or .sdf files as input for CYP metabolism prediction) — github:bitbucket.org__Leon_Ti__cypreact

Examples

import pandas as pd
df = pd.read_csv('molecules.csv')
df_dedup = df.drop_duplicates(subset=['SMILES'])
df_dedup.to_csv('molecules_dedup.csv', index=False)

Evaluation signals

  • Deduplicated dataset row count is equal to or less than the input count; difference equals the number of removed duplicates
  • All SMILES strings in the output are unique when compared by exact match or canonical form
  • Metadata integrity is preserved: no rows are corrupted, truncated, or have missing fields after deduplication
  • CypReact processes the deduplicated .csv without errors and produces one result entry per unique molecule
  • Deduplication log (if generated) lists all removed duplicate entries with their counts, totaling to input − output row difference

Limitations

  • Deduplication by exact SMILES string match may miss equivalent structures with alternative SMILES notations; canonical SMILES normalization via RDKit is recommended but adds computational overhead
  • Stereoisomers and tautomers represented by distinct SMILES are not detected as duplicates; domain knowledge or explicit tautomer rules are needed to resolve these
  • Large datasets (millions of molecules) may require memory-efficient deduplication strategies (e.g., set-based or streaming algorithms) not covered by simple pandas operations
  • No changelog or version history available for CypReact to document whether deduplication behavior has changed across releases

Evidence

  • [other] Extract and deduplicate the molecule list: "Extract and deduplicate the molecule list."
  • [intro] CSV format with comma-separated SMILES: "If the user input a .csv file, it should contains the SMILEs of all molecules and split them with ","."
  • [other] Validation and structured data formatting: "Validate each SMILES string for syntactic correctness using RDKit or equivalent molecular structure validator."
  • [other] Output format compatibility: "Format the parsed molecule list as a structured data object (DataFrame or JSON) compatible with CypReact input specifications."

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.