Chuyển đến nội dung
Skillpedia
Tài liệu kỹ thuật51k · #3511

ontology-term-resolution

Skill này làm gì

Công cụ này giúp tìm và xác minh mã định danh thuật ngữ khoa học. Nó chuyển tên mô tả thành mã duy nhất (ID) và xác nhận các mã hiện có có hợp lệ và còn được dùng hay không.

Khi nào nên dùng

  • ✓Khi chú thích dữ liệu bằng thuật ngữ khoa học.
  • ✓Khi điền biểu mẫu nộp dữ liệu.
  • ✓Khi kiểm tra tính hợp lệ của mã trong các tệp cũ.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/K-Dense-AI/scientific-agent-skills/blob/main/skills/ontology-term-resolution/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tìm ID của “left ventricle” trong ontology UBERON.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Công cụ tìm kiếm trong các cơ sở dữ liệu khoa học theo thuật ngữ bạn mô tả, hoặc kiểm tra các mã bạn cung cấp. Nó dùng các dịch vụ như OLS và Bioregistry để đảm bảo mã định danh chính xác và được cập nhật.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Ontology Term Resolution

When to use

Any time an ontology identifier is about to be written down or trusted: annotating a metadata column, filling a submission template, auditing a table someone else produced, or checking whether an ID in an old file is still current.

The rule

Never write an ontology ID from memory, and never accept one without checking it.

Ontology IDs are memorable in form and arbitrary in detail. A plausible-looking UBERON:0002108 is a real term (small intestine) that is not the liver, and nothing downstream will catch the substitution — the ID is well-formed, the ontology is right, and the metadata is silently wrong. Reviewers cannot spot it either, which is why these errors persist into published datasets.

OLS search and ZOOMA emit candidates. Validate each selected ID with OLS term detail, then check its definition against the sample and the target schema before accepting it. Bioregistry, Identifiers.org, ZOOMA, and Ontobee answer prefix, landing-page, and shorthand questions — they do not replace that OLS check.

Which service

Question Script Authority
What is the term for "left ventricle"? scripts/resolve_terms.py OLS
OLS missed lab shorthand (PBMC, WT) scripts/map_terms.py, then validate_terms.py ZOOMA proposes; OLS validates the term
Is EFO:0001067 real, current, correctly labelled? scripts/validate_terms.py OLS
Is HPO a real prefix? Does HP:notanid match the pattern? scripts/lookup_prefix.py Bioregistry
Which landing page should this CURIE open? scripts/lookup_prefix.py Identifiers.org + Ontobee URLs

All four scripts take single values or files, emit TSV or JSON, and need no packages beyond the standard library. Full traps for the non-OLS services are in references/companion-apis.md.

Resolve text to terms

cd skills/ontology-term-resolution/scripts

# one string, constrained to the ontology that should define it
python3 resolve_terms.py "liver" --ontology uberon
query   rank  curie           iri                                               label  ontology  match_type   strategy  defining_ontology
liver   1     UBERON:0002107  http://purl.obolibrary.org/obo/UBERON_0002107       liver  uberon    exact_label  exact     true
# a column of tissue names; anything not an exact hit is reported, not guessed
python3 resolve_terms.py --input tissues.txt --ontology uberon \
    --exact-only --format tsv -o resolved.tsv

# accept fuzzy fallbacks, then review the partial hits by hand
python3 resolve_terms.py "left ventrical of heart" --ontology uberon --top 3

The search escalates exact (label and synonym) → token → fulltext and stops at the first strategy that returns candidates, reporting which one fired. --exact-only disables the ladder and locally rejects partial, related, broad, narrow, and unscoped synonym matches. Searches are bounded candidate lists (--top), not exhaustive ambiguity checks. --branch UBERON:0000465 uses OLS hierarchical ancestry, including part-of/develops-from.

Read match_type before using a result. exact_label and exact_synonym establish lexical agreement (the latter also requires an exact synonym annotation), not correct sample context. related_synonym, broad_synonym, narrow_synonym, unspecified_synonym, and partial require curation. Validate every selected ID; search does not expose obsolescence in its records. unresolved is a legitimate output. See references/curation-rules.md before normalising input.

Validate existing IDs

python3 validate_terms.py UBERON:0002107 EFO:0001067 UBERON:9999999
id              status     actual_label                  ontology  replacement     detail
UBERON:0002107  ok         liver                         uberon
EFO:0001067     obsolete   obsolete_parasitic infection  efo       MONDO:0005135   obsolete; replaced by MONDO:0005135
UBERON:9999999  not_found                                                          no such term in the ontology this prefix names

Exit code is 1 if anything failed, 0 otherwise, 2 on usage or network trouble — so it works as a CI gate on a metadata file:

# id + label columns; catches IDs that exist but are labelled as something else
python3 validate_terms.py --input metadata.tsv --strict

# a tissue column must hold UBERON anatomical entities and nothing else

…
Câu hỏi thường gặp

“Ontology ID” là gì?

Đó là mã duy nhất, chuẩn hóa, đại diện cho một khái niệm khoa học cụ thể, như loại tế bào, bệnh hoặc bộ phận cơ thể.

Tại sao cần kiểm tra ID?

ID sai hoặc lỗi thời có thể gây lỗi trong phân tích dữ liệu, khiến kết quả khoa học khó hiểu và khó tái tạo.

“Obsolete” nghĩa là gì đối với một ID?

Nghĩa là ID không còn được dùng và đã được thay thế bằng ID mới. Công cụ có thể gợi ý ID thay thế.

Chi tiết

Mô tả gốc của tác giả

Resolves free-text scientific labels to ontology term IDs and validates existing CURIEs against the EBI Ontology Lookup Service (OLS4). Also looks up prefixes in Bioregistry, resolves compact identifiers via Identifiers.org, maps lab shorthand with ZOOMA, and builds Ontobee term pages. Use whenever an ontology identifier must be produced or checked - annotating tissue, cell type, disease, phenotyp

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

Độ phổ biến

Sao GitHub
51k
Vị trí xếp hạng
#3511
Giấy phép
MIT
Cập nhật
15/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự