Przejdź do treści
Biblioteka skilli
Nauka i badania · Research

chembl-database

/chembl-database

Przeszukuje bazę ChEMBL z cząsteczkami bioaktywnymi, celami leków, wartościami IC50 i Ki oraz zatwierdzonymi lekami.

Licencja
Apache-2.0
Ostatnia zmiana repozytorium
08.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
6
Skrypty
1
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 08.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

Co sprawdzić przed instalacją
  • 1 skrypt w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scripts/chembl_api.py

Co robi i kiedy

Przeszukuje bazę ChEMBL z cząsteczkami bioaktywnymi, celami leków, wartościami IC50 i Ki oraz zatwierdzonymi lekami.

Oryginalny opis (EN)

Query the ChEMBL database for bioactive molecules, drug targets, bioactivity data, approved drugs, and chemical structures. Use when the user asks about compounds, targets, IC50/Ki values, drug mechanisms, or structure searches.

Jak działa

  1. Prerequisites
  2. Core Rules
  3. Utility Script
  4. Common Options
  5. Reference
  6. Workflow
Sekcje z nagłówków SKILL.md, w oryginale · 275 linii, 1 238 słów
Podgląd SKILL.md
---
name: chembl-database
description: 'Query the ChEMBL database for bioactive molecules, drug targets, bioactivity
  data, approved drugs, and chemical structures. Use when the user asks about compounds,
  targets, IC50/Ki values, drug mechanisms, or structure searches.

  '
metadata:
  category: data
  legacy_category: databases
  taxonomy_version: enzyme-agent/taxonomy/v1
  capability_ids:
  - data.scientific_database.retrieval
---

# ChEMBL Database Query

## Prerequisites

1.  **Python**: Run scripts directly with `python`; do not require `uv` unless the script explicitly fails without it.
2.  **User Notification**: If LICENSE_NOTIFICATION.txt does not already exist in
    this skill directory then (1) prominently notify the user to check the terms
    at https://chembl.gitbook.io/chembl-interface-documentation/about, then (2)
    create the file recording the notification text and timestamp.

## Core Rules

-   [!IMPORTANT] **Use the Utility Scripts**: You MUST ALWAYS use the provided
    utility script `scripts/chembl_api.py` for all ChEMBL API interactions,
    including checking status. NEVER use `curl` or custom Python requests to
    query the ChEMBL API directly. This ensures rate limit is enfoced and also
    retries on network errors.

-   **Output to File (Required)**: The `--output` flag is **required** for every
    subcommand. All JSON results are written to the specified file. After
    running the command, read the output file with jq or your own code to
    extract the data. List results are typically wrapped in a JSON array keyed
    by the endpoint name (e.g., `molecules`, `activities`).

-   **Notification**: If this skill is used, ensure this is mentioned in the
    output.

## Utility Script

All ChEMBL API queries use one script with subcommands:

```bash
python scripts/chembl_api.py <subcommand> --output <file> [options]
```

--------------------------------------------------------------------------------

### 1. Check API Status

```bash
python scripts/chembl_api.py status --output /tmp/status.json
```

--------------------------------------------------------------------------------

### 2. Molecule Queries

**Fetch by ChEMBL ID:** `bash python scripts/chembl_api.py molecule --id
CHEMBL25 --output /tmp/mol.json`

**Search by name:** `bash python scripts/chembl_api.py molecule --search
"aspirin" --limit 3 --output /tmp/mol_search.json`

**Batch fetch:** `bash python scripts/chembl_api.py molecule --ids
"CHEMBL25;CHEMBL1642" --limit 10 --output /tmp/mol_batch.json`

**Filter by properties:** `bash python scripts/chembl_api.py molecule --filter
molecule_properties__mw_freebase__lte=500 --limit 5 --output
/tmp/mol_filter.json`

**Filter by range:** `bash python scripts/chembl_api.py molecule --filter
molecule_properties__mw_freebase__range=150,200 --limit 5 --output
/tmp/mol_range.json`

**Download SDF structure file:** `bash python scripts/chembl_api.py molecule
--id CHEMBL25 --dl_format sdf --output /tmp/aspirin.sdf`

> **Tip**: SDF/MOL files can be passed directly to tools like PyMOL or RDKit for
> 3D visualization and analysis.

--------------------------------------------------------------------------------

### 3. Target Queries

**Search for targets:** `bash python scripts/chembl_api.py target --search
"EGFR" --limit 5 --output /tmp/targets.json`

**Fetch by ID:** `bash python scripts/chembl_api.py target --id CHEMBL203
--output /tmp/egfr.json`

--------------------------------------------------------------------------------

### 4. Bioactivity Data

**Fetch activity by ID:** `bash python scripts/chembl_api.py activity --id 31863
--output /tmp/act.json`

**Search activities:** `bash python scripts/chembl_api.py activity --search
"EGFR" --limit 5 --output /tmp/act_search.json`

**Filter activities for a target:** `bash python scripts/chembl_api.py activity
--filter target_chembl_id=CHEMBL203 standard_type=IC50 --limit 10 --output
/tmp/egfr_ic50.json`

**Normalize bioactivity units to nM:** `bash python scripts/chembl_api.py
activity --filter target_chembl_id=CHEMBL203 standard_type=IC50 --limit 5
--normalize --output /tmp/egfr_normalized.json`

> **Important**: Bioactivity values come in various units (nM, µM, pM). Use
> `--normalize` to convert all values to nM for consistent comparison. Each
> record will include `normalized_value_nM` and `normalization_note`.

--------------------------------------------------------------------------------

### 5. Drug Information

**Fetch drug details:** `bash python scripts/chembl_api.py drug --id CHEMBL25
--output /tmp/drug.json`

**Drug indications:** `bash python scripts/chembl_api.py drug_indication
--filter molecule_chembl_id=CHEMBL25 --limit 10 --output /tmp/indications.json`

**Filter indications by phase:** `bash python scripts/chembl_api.py
drug_indication --filter molecule_chembl_id=CHEMBL25 max_phase_for_ind=4.0
--limit 10 --output /tmp/approved_indications.json`

**Drug warnings:** `bash python scripts/chembl_api.py drug_warning --limit 5
--output /tmp/warnings.json`

**Mechanisms of action:** `bash python scripts/chembl_api.py mechanism --filter
molecule_chembl_id=CHEMBL25 --limit 5 --output /tmp/mech.json`

--------------------------------------------------------------------------------

### 6. Structure-Based Searches

> **Note**: Both similarity and substructure searches are performed
> **server-side** on ChEMBL's pre-indexed database. They do not require a local
> RDKit installation.

**Similarity search (SMILES + threshold):** `bash python scripts/chembl_api.py
similarity --smiles "CC(=O)Oc1ccccc1C(=O)O" --similarity 85 --limit 5 --output
/tmp/similar.json`

**Substructure search (SMILES):** `bash python scripts/chembl_api.py
substructure --smiles "c1ccccc1" --limit 5 --output /tmp/substruct.json`

--------------------------------------------------------------------------------

### 7. Compound Image

Download a 2D structure image (SVG by default, scalable for publication):

```bash
python scripts/chembl_api.py image --id CHEMBL25 --output /tmp/chembl25.svg
```

*Options:*

-   `--dimensions`: Image size in pixels (max 500, default 500).
-   `--engine`: Rendering engine (default: rdkit).
-   `--img_format`: Output format — `svg` (default, vector) or `png` (raster).

--------------------------------------------------------------------------------

### 8. Cross-Referencing with Other Databases

ChEMBL integrates with UniProt, Ensembl, PubChem, and other databases. Common
cross-referencing patterns:

**Find a ChEMBL target from a UniProt accession:** `python
scripts/chembl_api.py target --filter target_components__accession=P00533
--limit 5 --output /tmp/uniprot_target.json`

**Resolve any ChEMBL ID to its entity type:** `bash python scripts/chembl_api.py
chembl_id_lookup --id CHEMBL203 --output /tmp/lookup.json`

**Look up cross-reference sources:** `bash python scripts/chembl_api.py
xref_source --limit 10 --output /tmp/xrefs.json`

> **Tip**: Use the `target_component` endpoint to find UniProt accessions, gene
> names, and protein sequences for any ChEMBL target.

--------------------------------------------------------------------------------

### 9. Pagination

All list endpoints support `--limit` and `--offset` for pagination:

```bash
# First page: 2 results starting at offset 0
python scripts/chembl_api.py molecule --limit 2 --offset 0 --output /tmp/page1.json

# Second page: next 2 results starting at offset 2
python scripts/chembl_api.py molecule --limit 2 --offset 2 --output /tmp/page2.json
```

The response includes `page_meta` with `total_count`, `limit`, `offset`, `next`,
and `previous` links. Use successive `--offset` values to page through large
result sets.

--------------------------------------------------------------------------------

### 10. Other Endpoints

All remaining endpoints follow the same pattern:

```bash
python scripts/chembl_api.py <subcommand> --output <file> [--id ID | --ids ID1;ID2 | --search QUERY] [--limit N] [--offset N] [--filter KEY=VAL ...]
```

**Key subcommands at a glance:**

-   `molecule` (searchable: true): Molecules/compounds — the primary entry point
-   `target` (searchable: true): Drug targets (proteins, organisms, etc.)
-   `activity` (searchable: true): Bioactivity data (IC50, Ki, EC50, etc.)
-   `drug` (searchable: false): Approved drugs
-   `mechanism` (searchable: false): Mechanisms of action
-   `assay` (searchable: true): Assay descriptions
-   `similarity` (searchable: false): Similarity search (special)
-   `substructure` (searchable: false): Substructure search (special)
-   `image` (searchable: false): Compound image download (special)

**Full subcommand list:**

-   `activity_supp` (searchable: false): Supplementary activity data
-   `assay_class` (searchable: false): Assay classifications
-   `atc_class` (searchable: false): ATC drug classifications
-   `binding_site` (searchable: false): Binding site information
-   `biotherapeutic` (searchable: false): Biotherapeutic molecules
-   `cell_line` (searchable: false): Cell line details
-   `chembl_id_lookup` (searchable: true): ChEMBL ID resolution
-   `chembl_release` (searchable: false): Database release info
-   `compound_record` (searchable: false): Compound records
-   `compound_structural_alert` (searchable: false): Structural alerts
-   `document` (searchable: true): Literature documents
-   `document_similarity` (searchable: false): Document similarity
-   `drug_indication` (searchable: false): Drug indications
-   `drug_warning` (searchable: false): Drug safety warnings
-   `go_slim` (searchable: false): GO slim terms
-   `metabolism` (searchable: false): Metabolism data
-   `molecule_form` (searchable: false): Molecule forms (salts/parents)
-   `organism` (searchable: false): Organisms
-   `protein_classification` (searchable: true): Protein classifications
-   `source` (searchable: false): Data sources
-   `target_component` (searchable: false): Target protein components
-   `target_relation` (searchable: false): Target relationships
-   `tissue` (searchable: false): Tissue types
-   `xref_source` (searchable: false): Cross-reference sources
-   `status` (searchable: false): API status check (special)

## Common Options

-   `--output FILE`: **Required.** Output file path for JSON results.
-   `--id ID`: Fetch a single record by ID.
-   `--ids ID1;ID2;...`: Batch fetch multiple records.
-   `--search QUERY`: Free-text search (only for searchable endpoints, marked
    ✓).
-   `--limit N`: Max results to return (default: 5).
-   `--offset N`: Pagination offset.
-   `--filter KEY=VAL`: Filter parameters (can specify multiple).
-   `--normalize`: (activity only) Normalize values to nM.
-   `--dl_format sdf|mol`: (molecule only) Download structure file.

## Reference

-   **API Endpoints Reference**: See
    [references/api_endpoints.md](references/api_endpoints.md) for the full list
    of endpoints and filter operators.

## Workflow

1.  Use `status --output /tmp/status.json` to verify the API is available.
2.  Search for targets, molecules, or drugs using the relevant subcommand.
3.  Read the output JSON file to extract IDs and data.
4.  Use IDs from search results to fetch detailed records.
5.  Query `activity` with filters to get bioactivity data for targets/molecules.
    Use `--normalize` when comparing values across studies.
6.  Use `similarity` or `substructure` for server-side structure-based queries.
7.  Download compound images with `image` or structure files with `molecule
    --dl_format sdf`.
8.  Use `target --filter target_components__accession=<UniProt>` to cross-
    reference with UniProt.
Pliki w paczce (6)
  • SKILL.md 11 KB
  • execution_profile.json 1 KB
  • scientific_contract.yaml 1 KB
  • agents/openai.yaml 1 KB
  • references/api_endpoints.md 3 KB
  • scripts/chembl_api.py 19 KB

Wersje

RepozytoriumWynikLicencja
Ta strona · ekko8600/enzyme_design_harness100Apache-2.0
aipoch/medical-research-skills100MIT
google-deepmind/science-skills95Apache-2.0
mkurman/zorai95MIT

Migawka bazy z 13.11.2026 · wersja paczki b878856fb45c (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100chembl
    Odpytuje usługi webowe bazy ChEMBL o zmierzoną bioaktywność, związki, cele, testy, mechanizmy działania i wskazania leków, buduje zbiory SAR i QSAR oraz wyszukuje po SMILES, InChIKey lub podobieństwie.
  • 100alterlab-chembl
    Odpytuje ChEMBL klientem Pythona o bioaktywne cząsteczki: wyszukuje związki po strukturze lub właściwościach, pobiera pomiary IC50, Ki i EC50 oraz znajduje inhibitory celu.
  • 100chembl-drug
    Odpytuje REST API ChEMBL o interakcje lek-cel, dane bioaktywności, właściwości ADMET i zatwierdzone leki, w tym mechanizm działania, powinowactwo wiązania i farmakokinetykę.
  • 100pubchem-compound
    Wyszukuje i pobiera dane o związkach chemicznych z PubChem przez PUG REST API: właściwości, struktury, wyszukiwanie podobieństwa i podstruktur oraz bioaktywność.
  • 100tooluniverse-chemical-compound-retrieval
    Pobiera dane o związkach chemicznych z PubChem i ChEMBL, ujednoznaczniając nazwy i oceniając jakość danych.
  • 100drugbank-database
    Analizuje dane o lekach z bazy DrugBank: właściwości, interakcje, cele, szlaki, struktury chemiczne i farmakologię, na potrzeby badań nad lekami i analizy interakcji.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.