본문으로 건너뛰기
Skillpedia
분석 및 스프레드시트51k · #3532

primekg

하는 일

이 에이전트는 PrimeKG라는 데이터베이스에서 정보를 검색합니다. 유전자, 약물, 질병, 형질 사이의 연결을 찾고 그 관계에 대한 세부 정보를 제공할 수 있습니다.

사용하는 경우

  • ✓유전자와 질병 사이에 알려진 연결을 확인할 때.
  • ✓특정 질병과 관련된 약물을 찾을 때.
  • ✓의학적 상태와 관련된 형질을 탐색할 때.

스킬 링크

https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/primekg/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/primekg/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“알츠하이머병과 관련된 유전자는 무엇인가요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

질병이나 유전자 이름 같은 용어를 제공하면, 에이전트가 PrimeKG 데이터베이스에서 관련 정보를 검색합니다. 직접 연결과 함께 두 단계까지의 경로도 돌려주어 관계를 이해하도록 돕습니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

PrimeKG Knowledge Graph

When to use

Use for reproducing PrimeKG analyses, resolving entities in a specific graph artifact, or exploring recorded gene, drug, disease, phenotype, anatomy, and pathway associations. A path supports a research hypothesis; it does not establish causality, treatment efficacy, a prescribing recommendation, or a diagnostic conclusion.

PrimeKG upstream now recommends OptimusKG for new work. This skill remains scoped to PrimeKG CSVs; the helper is not an OptimusKG client. Published PrimeKG integrates 20 resources, with approximately 129,000 nodes and 4.05 million undirected relationships. CSVs contain reverse rows, so row counts differ from distinct undirected relationship counts. Count the actual pinned artifact.

1. Pin and verify the input

The official dataset remained V2.1, published 2022-05-02, at the 2026-10-01 review. Its kg.csv has Dataverse file ID 6180620, size 981751236 bytes, and provider MD5 aac8191d4fbc5bf09cdf8c3c78b4e75f. The record declares CC0 1.0; upstream construction code is MIT. These are distinct from this skill's retained license declaration and from terms of individual source resources used in a rebuild.

Use the artifact and API reference to obtain metadata, verify the file checksum, or distinguish kg.csv, kg_grouped.csv, features, and PyTDC. The 2023 construction/OMIM updates in GitHub do not make the published 2022 artifact a 2023 dataset. Record DOI, version, filename, file ID, checksum, retrieval date, and any subset/rebuild steps with every result.

The helper makes no remote graph queries. Download the CSV deliberately after checking storage and RAM. This full-download example is illustrative; validation used small HTTP byte ranges and synthetic data, not the 982 MB file:

curl --fail --location --output kg.csv \
  'https://dataverse.harvard.edu/api/access/datafile/6180620'
export PRIMEKG_DATA="$PWD/kg.csv"

PRIMEKG_DATA is read when the module is imported; the default is data/PrimeKG/kg.csv. The module reads the whole CSV for each public query. low_memory parsing is not a bounded-memory graph engine. For many queries or limited RAM, build an indexed local store from the pinned file and validate its node keys, edge multiplicities, and counts.

2. Resolve a typed entity before traversal

Run from this skill's directory with pandas installed, so scripts.query_primekg is importable. The following is an illustrative real-data query; no disease result or ID is promised without inspecting the pinned file:

from scripts.query_primekg import search_nodes, get_neighbors

candidates = search_nodes("Alzheimer", node_type="disease", limit=None)
for node in candidates:
    print(node)  # id, type, name, source, and index when present

# Review the candidates and select the intended disease before calling:
# get_neighbors(selected["id"], node_type=selected["type"],
#               node_source=selected["source"])

Search is literal, case insensitive, and returns at most 20 matches by default; limit=None removes that cap. Preserve IDs as strings, including numeric-looking and underscore-joined IDs. Drug nodes use DrugBank identifiers; diseases can use MONDO or MONDO_grouped, including IDs joining multiple diseases. Do not invent EFO, ChEMBL, Wikidata, or prefixed MONDO IDs from labels. x_index/y_index are local release indexes, not ontology accessions and not stable across rebuilds.

The helper identifies a node by (id, type, source) and rejects ambiguous bare IDs or a key mapping to multiple release indexes. Supply node_type and node_source from the search result. Equal numeric IDs from different namespaces are different nodes.

3. Retrieve associations without losing their meaning

get_neighbors(node_id, relation_type=None, *, node_type=None, node_source=None) collects both stored orientations. Reverse rows are consolidated into one adjacency per neighboring identity/name, relation, and display_relation; all original rows remain in edge_rows. Extra CSV evidence columns and release indexes are preserved. Do not multiply evidence counts by the number of reverse copies.

Use exact stored relation names. Common published relations include:

relation Interpretation to retain

…

자주 묻는 질문

PrimeKG란 무엇인가요?

유전자, 약물, 질병, 형질에 대한 정보를 정리하고 그 관계를 보여 주는 대규모 데이터베이스입니다.

이 에이전트가 치료가 효과가 있는지 알려 줄 수 있나요?

아닙니다. 이 에이전트는 데이터베이스에 기록된 연관성만 보여 줍니다. 치료 효과를 확인하거나 권장 사항을 제시할 수 없습니다.

파일을 내려받아야 하나요?

네, 이 에이전트를 사용하려면 PrimeKG 데이터베이스에서 특정 파일을 내려받아야 합니다. 에이전트는 실시간으로 인터넷을 검색하지 않습니다.

상세 정보

작성자의 원본 설명

Queries a pinned Precision Medicine Knowledge Graph (PrimeKG) CSV for typed gene, drug, disease, and phenotype nodes, direct associations, disease context, and one- or two-hop paths. Use for PrimeKG reproducibility, biological association lookup, and hypothesis generation with relation and data provenance preserved.

repo: K-Dense-AI/scientific-agent-skills

인기도

GitHub 스타
51k
순위
#3532
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬