open-targets-search
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOpen Targets Search
Open Targets 搜索
Search the complete Open Targets database of drug-disease associations and target validation data using natural language queries powered by Valyu's semantic search API.
使用由Valyu语义搜索API提供支持的自然语言查询,搜索Open Targets数据库中完整的药物-疾病关联和靶点验证数据。
Why This Skill is Powerful
该工具的强大之处
- No API Parameter Parsing: Just pass natural language queries directly - no need to construct complex search parameters
- Semantic Search: Understands the meaning of your query, not just keyword matching
- Full-Text Access: Returns complete target-disease association data with evidence scores
- Image Links: Includes data visualizations when available
- Comprehensive Coverage: Access to all Open Targets drug-disease association data
- 无需解析API参数:直接传入自然语言查询,无需构建复杂的搜索参数
- 语义搜索:理解查询的含义,而非仅进行关键词匹配
- 全文访问:返回包含证据评分的完整靶点-疾病关联数据
- 图片链接:在可用时包含数据可视化内容
- 全面覆盖:可访问Open Targets所有的药物-疾病关联数据
Requirements
要求
- Node.js 18+ (uses built-in fetch)
- Valyu API key from https://platform.valyu.ai ($10 free credits)
- Node.js 18+(使用内置的fetch)
- 从https://platform.valyu.ai获取Valyu API密钥(赠送10美元免费额度)
CRITICAL: Script Path Resolution
重要提示:脚本路径解析
The commands in this documentation are relative to this skill's installation directory.
scripts/searchBefore running any command, locate the script using:
bash
OPEN_TARGETS_SCRIPT=$(find ~/.claude/plugins/cache -name "search" -path "*/open-targets-search/*/scripts/*" -type f 2>/dev/null | head -1)Then use the full path for all commands:
bash
$OPEN_TARGETS_SCRIPT "JAK2 inhibitors" 15本文档中的命令是相对于该工具的安装目录的。
scripts/search在运行任何命令之前,使用以下命令定位脚本:
bash
OPEN_TARGETS_SCRIPT=$(find ~/.claude/plugins/cache -name "search" -path "*/open-targets-search/*/scripts/*" -type f 2>/dev/null | head -1)然后使用完整路径执行所有命令:
bash
$OPEN_TARGETS_SCRIPT "JAK2 inhibitors" 15API Key Setup Flow
API密钥设置流程
When you run a search and receive , follow this flow:
"setup_required": true-
Ask the user for their API key: "To search Open Targets, I need your Valyu API key. Get one free ($10 credits) at https://platform.valyu.ai"
-
Once the user provides the key, run:bash
scripts/search setup <api-key> -
Retry the original search.
当你运行搜索并收到时,请按照以下流程操作:
"setup_required": true-
向用户索要API密钥: "要搜索Open Targets,我需要你的Valyu API密钥。可在https://platform.valyu.ai免费获取(赠送10美元额度)"
-
用户提供密钥后,运行:bash
scripts/search setup <api-key> -
重试原始搜索。
When to Use This Skill
使用场景
- Target validation for diseases
- Drug-disease associations
- Target prioritization for research
- Genetic evidence for targets
- Target-disease pathway analysis
- Therapeutic hypothesis validation
- 疾病的靶点验证
- 药物-疾病关联研究
- 研究中的靶点优先级排序
- 靶点的遗传学证据
- 靶点-疾病通路分析
- 治疗假说验证
Output Format
输出格式
json
{
"success": true,
"type": "open_targets_search",
"query": "JAK2 inhibitors",
"result_count": 10,
"results": [
{
"title": "Target-Disease Association",
"url": "https://platform.opentargets.org/...",
"content": "Association data, evidence, scores...",
"source": "open-targets",
"relevance_score": 0.95,
"images": ["https://example.com/pathway.png"]
}
],
"cost": 0.025
}json
{
"success": true,
"type": "open_targets_search",
"query": "JAK2 inhibitors",
"result_count": 10,
"results": [
{
"title": "Target-Disease Association",
"url": "https://platform.opentargets.org/...",
"content": "Association data, evidence, scores...",
"source": "open-targets",
"relevance_score": 0.95,
"images": ["https://example.com/pathway.png"]
}
],
"cost": 0.025
}Processing Results
结果处理
With jq
使用jq
bash
undefinedbash
undefinedGet association titles
获取关联标题
scripts/search "query" 10 | jq -r '.results[].title'
scripts/search "query" 10 | jq -r '.results[].title'
Get URLs
获取URL
scripts/search "query" 10 | jq -r '.results[].url'
scripts/search "query" 10 | jq -r '.results[].url'
Extract full content
提取完整内容
scripts/search "query" 10 | jq -r '.results[].content'
undefinedscripts/search "query" 10 | jq -r '.results[].content'
undefinedCommon Use Cases
常见使用案例
Target Validation
靶点验证
bash
undefinedbash
undefinedFind target evidence
查找靶点证据
scripts/search "kinase targets in inflammatory diseases" 50
undefinedscripts/search "kinase targets in inflammatory diseases" 50
undefinedDrug Repurposing
药物重定位
bash
undefinedbash
undefinedSearch for repurposing opportunities
搜索重定位机会
scripts/search "drugs targeting IL-6 pathway" 20
undefinedscripts/search "drugs targeting IL-6 pathway" 20
undefinedGenetic Evidence
遗传学证据
bash
undefinedbash
undefinedFind genetic associations
查找遗传学关联
scripts/search "loss of function variants protective effects" 15
undefinedscripts/search "loss of function variants protective effects" 15
undefinedDisease Mechanism
疾病机制
bash
undefinedbash
undefinedSearch for mechanistic insights
搜索机制见解
scripts/search "immune checkpoint targets in cancer" 25
undefinedscripts/search "immune checkpoint targets in cancer" 25
undefinedError Handling
错误处理
All commands return JSON with field:
successjson
{
"success": false,
"error": "Error message"
}Exit codes:
- - Success
0 - - Error (check JSON for details)
1
所有命令都会返回包含字段的JSON:
successjson
{
"success": false,
"error": "Error message"
}退出码:
- - 成功
0 - - 错误(查看JSON获取详情)
1
API Endpoint
API端点
- Base URL:
https://api.valyu.ai/v1 - Endpoint:
/search - Authentication: X-API-Key header
- 基础URL:
https://api.valyu.ai/v1 - 端点:
/search - 认证: X-API-Key请求头
Architecture
架构
scripts/
├── search # Bash wrapper
└── search.mjs # Node.js CLIDirect API calls using Node.js built-in , zero external dependencies.
fetch()scripts/
├── search # Bash包装器
└── search.mjs # Node.js命令行工具使用Node.js内置的进行直接API调用,无外部依赖。
fetch()Adding to Your Project
集成到你的项目中
If you're building an AI project and want to integrate Open Targets Search directly into your application, use the Valyu SDK:
如果你正在构建AI项目,并希望将Open Targets Search直接集成到你的应用中,请使用Valyu SDK:
Python Integration
Python集成
python
from valyu import Valyu
client = Valyu(api_key="your-api-key")
response = client.search(
query="your search query here",
included_sources=["valyu/valyu-open-targets"],
max_results=20
)
for result in response["results"]:
print(f"Title: {result['title']}")
print(f"URL: {result['url']}")
print(f"Content: {result['content'][:500]}...")python
from valyu import Valyu
client = Valyu(api_key="your-api-key")
response = client.search(
query="your search query here",
included_sources=["valyu/valyu-open-targets"],
max_results=20
)
for result in response["results"]:
print(f"Title: {result['title']}")
print(f"URL: {result['url']}")
print(f"Content: {result['content'][:500]}...")TypeScript Integration
TypeScript集成
typescript
import { Valyu } from "valyu-js";
const client = new Valyu("your-api-key");
const response = await client.search({
query: "your search query here",
includedSources: ["valyu/valyu-open-targets"],
maxResults: 20
});
response.results.forEach((result) => {
console.log(`Title: ${result.title}`);
console.log(`URL: ${result.url}`);
console.log(`Content: ${result.content.substring(0, 500)}...`);
});See the Valyu docs for full integration examples and SDK reference.
typescript
import { Valyu } from "valyu-js";
const client = new Valyu("your-api-key");
const response = await client.search({
query: "your search query here",
includedSources: ["valyu/valyu-open-targets"],
maxResults: 20
});
response.results.forEach((result) => {
console.log(`Title: ${result.title}`);
console.log(`URL: ${result.url}`);
console.log(`Content: ${result.content.substring(0, 500)}...`);
});查看Valyu文档获取完整的集成示例和SDK参考。