返回技能列表

primekg

K-Dense-AI
更新于 Today
26,534
2,743
26,534
在 GitHub 上查看
其他data

关于

This skill enables programmatic querying of the PrimeKG knowledge graph to retrieve interconnected biomedical data on genes, drugs, and diseases. Developers can use it to search for biological entities, analyze their associations, and explore paths for insights like drug repurposing. It's ideal for integrating structured, multiscale medical relationships into bioinformatics applications.

快速安装

Claude Code

推荐
主要方式
npx skills add K-Dense-AI/claude-scientific-skills -a claude-code
插件命令备选方式
/plugin add https://github.com/K-Dense-AI/claude-scientific-skills
Git 克隆备选方式
git clone https://github.com/K-Dense-AI/claude-scientific-skills.git ~/.claude/skills/primekg

在 Claude Code 中复制并粘贴此命令以安装该技能

技能文档

PrimeKG Knowledge Graph Skill

Overview

PrimeKG is a precision medicine knowledge graph that integrates over 20 primary databases and high-quality scientific literature into a single resource. It contains over 100,000 nodes and 4 million edges across 29 relationship types, including drug-target, disease-gene, and phenotype-disease associations.

Key capabilities:

  • Search for nodes (genes, proteins, drugs, diseases, phenotypes)
  • Retrieve direct neighbors (associated entities and clinical evidence)
  • Analyze local disease context (related genes, drugs, phenotypes)
  • Identify drug-disease paths (potential repurposing opportunities)

Data access: Programmatic access via query_primekg.py. Data is stored at C:\Users\eamon\Documents\Data\PrimeKG\kg.csv.

When to Use This Skill

This skill should be used when:

  • Knowledge-based drug discovery: Identifying targets and mechanisms for diseases.
  • Drug repurposing: Finding existing drugs that might have evidence for new indications.
  • Phenotype analysis: Understanding how symptoms/phenotypes relate to diseases and genes.
  • Multiscale biology: Bridging the gap between molecular targets (genes) and clinical outcomes (diseases).
  • Network pharmacology: Investigating the broader network effects of drug-target interactions.

Core Workflow

1. Search for Entities

Find identifiers for genes, drugs, or diseases.

from scripts.query_primekg import search_nodes

# Search for Alzheimer's disease nodes
results = search_nodes("Alzheimer", node_type="disease")
# Returns: [{"id": "EFO_0000249", "type": "disease", "name": "Alzheimer's disease", ...}]

2. Get Neighbors (Direct Associations)

Retrieve all connected nodes and relationship types.

from scripts.query_primekg import get_neighbors

# Get all neighbors of a specific disease ID
neighbors = get_neighbors("EFO_0000249")
# Returns: List of neighbors like {"neighbor_name": "APOE", "relation": "disease_gene", ...}

3. Analyze Disease Context

A high-level function to summarize associations for a disease.

from scripts.query_primekg import get_disease_context

# Comprehensive summary for a disease
context = get_disease_context("Alzheimer's disease")
# Access: context['associated_genes'], context['associated_drugs'], context['phenotypes']

Relationship Types in PrimeKG

The graph contains several key relationship types including:

  • protein_protein: Physical PPIs
  • drug_protein: Drug target/mechanism associations
  • disease_gene: Genetic associations
  • drug_disease: Indications and contraindications
  • disease_phenotype: Clinical signs and symptoms
  • gwas: Genome-wide association studies evidence

Best Practices

  1. Use specific IDs: When using get_neighbors, ensure you have the correct ID from search_nodes.
  2. Context first: Use get_disease_context for a broad overview before diving into specific genes or drugs.
  3. Filter relationships: Use the relation_type filter in get_neighbors to focus on specific evidence (e.g., only drug_protein).
  4. Multiscale integration: Combine with OpenTargets for deeper genetic evidence or Semantic Scholar for the latest literature context.

Resources

Scripts

  • scripts/query_primekg.py: Core functions for searching and querying the knowledge graph.

Data Path

  • Data: /mnt/c/Users/eamon/Documents/Data/PrimeKG/kg.csv
  • Total nodes: ~129,000
  • Total edges: ~4,000,000
  • Database: CSV-based, optimized for pandas querying.

GitHub 仓库

K-Dense-AI/claude-scientific-skills
路径: skills/primekg
0
agent-skillsai-scientistbioinformaticschemoinformaticsclaudeclaude-skills

相关推荐技能

llamaguard

其他

LlamaGuard是Meta推出的7-8B参数内容审核模型,专门用于过滤LLM的输入和输出内容。它能检测六大安全风险类别(暴力/仇恨、性内容、武器、违禁品、自残、犯罪计划),准确率达94-95%。开发者可通过HuggingFace、vLLM或Sagemaker快速部署,并能与NeMo Guardrails集成实现自动化安全防护。

查看技能

cost-optimization

其他

这个Claude Skill帮助开发者优化云成本,通过资源调整、标记策略和预留实例来降低AWS、Azure和GCP的开支。它适用于减少云支出、分析基础设施成本或实施成本治理策略的场景。关键功能包括提供成本可视化、资源规模调整指导和定价模型优化建议。

查看技能

quantizing-models-bitsandbytes

其他

这个Skill使用bitsandbytes库量化大语言模型,能在GPU内存有限时通过8位或4位量化减少50-75%内存占用,同时保持精度损失最小。它支持INT8、NF4、FP4等多种量化格式,可与HuggingFace Transformers无缝集成,适用于需要部署更大模型或加速推理的场景。还提供QLoRA训练和8位优化器支持,让开发者能轻松实现高效模型压缩。

查看技能

dispatching-parallel-agents

其他

该Skill用于并行处理3个以上无依赖关系的独立故障,可为每个问题域分派专属Claude代理同时执行调查修复。它通过并发处理多个独立问题显著提升故障排查效率,特别适用于测试文件、子系统等无共享状态的场景。

查看技能