pharmkg-query

Query PharmKG triples by entity name and export JSON results.

130|4|Updated Mar 13, 2026
One-click install
npx skills add https://github.com/QSong-github/DrugClaw --skill pharmkg-query
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pharmkg-query
Source: https://github.com/QSong-github/DrugClaw/tree/main/skills/drug_knowledgebase/pharmkg
Command: npx skills add https://github.com/QSong-github/DrugClaw --skill pharmkg-query

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PharmKG Query Skill helps researchers and developers retrieve knowledge graph relationships by searching the PharmKG triples with an entity name, enabling rapid, evidence-grounded exploration of biomedical links.

Core Features & Use Cases

  • Case-insensitive search: exact matches first, with substring fallback, across drugs, genes, and diseases.
  • Batch queries and summarization: handle multiple entities and produce readable results or JSON exports.
  • API surface: load_pharmkg(path), search(triples, entity, index), search_batch(...), summarize(hits, entity), to_json(hits) for easy integration.

Quick Start

Run a query by providing an entity name to retrieve its related triples from PharmKG.

Frequently Asked Questions about pharmkg-query

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query a biomedical knowledge graph to find relationships between drugs, genes, and diseases?

To find relationships between drugs, genes, and diseases, you query the PharmKG dataset by providing an entity name. The search returns related triples and normalized relations, prioritizing exact matches before falling back to substring results.

Can I search for multiple biomedical entities at the same time?

You can perform batch queries to search multiple biomedical entities simultaneously. The system processes multiple entity names and produces readable summaries or JSON exports of the matched triples.

What data do I need to search PharmKG for drug and gene interactions?

To search for drug and gene interactions, you need a local copy of the PharmKG train.tsv file. The system loads this file to build the searchable index of biomedical triples before executing queries.

Does the biomedical knowledge graph search support case-insensitive entity matching?

The biomedical knowledge graph search supports case-insensitive matching. It prioritizes exact matches first and uses a substring fallback to retrieve related drugs, genes, and diseases.

How do I export biomedical knowledge graph query results?

You export biomedical knowledge graph query results using the built-in JSON export utility. After querying entities and summarizing the hits, you can convert the retrieved triples into JSON format for integration.