Skip to main content

Add your description here

Project description

ChemNames

A CLI utility to retrieve chemical data (SMILES, InChI, Full Names) from PubChem and map Compound names to their corresponding identifiers.

Installation

This package is managed with standard Python tools and can be installed via pip.

  1. Clone the repository.
  2. Install the package in editable mode (or normal mode):
pip install .

Or using uv to manage the environment:

uv pip install .

After installation, the CLI tool addchemnames will be available in your path.

Usage

1. Retrieve Chemical Data

The main utility reads a CSV file containing a Compound column, queries PubChem, and outputs a new CSV with added SMILES, InChI, and Full Name columns.

Input CSV Format: The input file MUST contain a column named Compound.

Example input.csv:

Compound,ID
Aspirin,1
Caffeine,2

Run the command:

addchemnames input.csv output.csv

Output: The tool will generate output.csv with the enriched data. If a compound is not found, "xxxxxx" will be used as the placeholder.

2. Add KEGG IDs

If you have a CSV file that already contains PubChem CIDs (e.g., from a previous step or source), you can use add_keggs.py (located in the root of the repository) to append KEGG IDs.

Run the command:

python add_keggs.py input_with_cids.csv output_with_keggs.csv

Notes

  • Network Requests: This tool makes network requests to PubChem. Large files may take some time to process.
  • Rate Limiting: The tool uses threading to speed up requests, but be mindful of PubChem's usage policies.
  • Data Accuracy: Data is fetched "as is" from PubChem.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

chemnames-0.2.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

chemnames-0.2.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file chemnames-0.2.1.tar.gz.

File metadata

  • Download URL: chemnames-0.2.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chemnames-0.2.1.tar.gz
Algorithm Hash digest
SHA256 1d999009c095966edda2ab05d31e5a70b50cc48cb621e763b09631385fca5f93
MD5 317f2266b2771aec8a0ef1ac894efecf
BLAKE2b-256 e08209ffc7459cd693bf8ea24885f8eeb2c203b78057fcd82918a26c388b1522

See more details on using hashes here.

Provenance

The following attestation bundles were made for chemnames-0.2.1.tar.gz:

Publisher: publish-pypi.yml on Desperadus/ChemNames

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file chemnames-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: chemnames-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for chemnames-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 529eafbd70a83616b29a53483156207c1e3c0e4414556ba0e84b719e7328da69
MD5 cdd50c5c0a1255a984d777cec44f6395
BLAKE2b-256 8dda3e901714fd276837eb69315881c217ce06e9c6cee052c7607c930c92f811

See more details on using hashes here.

Provenance

The following attestation bundles were made for chemnames-0.2.1-py3-none-any.whl:

Publisher: publish-pypi.yml on Desperadus/ChemNames

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page