merge-terms
БесплатноБез исполняемых скриптовНе проверенUse when asked to merge two MONDO terms — obsoleting one and transferring its metadata to the surviving term
от monarch-initiative★ 335 звёзд на GitHubОб этом скилле
Merge two MONDO terms
⚠️ Running ODK commands
Every step below uses ODK tools (owltools, robot, make NORM). Read the odk skill first for how to invoke them — sh run.sh <cmd> if you have a TTY, otherwise direct docker run ... -i obolibrary/odkfull:<tag> (the tag lives in src/ontology/run.sh).
The commands below show the body (what goes after sh run.sh or after the docker prefix). Pick the wrapper based on your environment.
Required inputs
- Term to obsolete (the duplicate / less-rich term)
- Replacement / surviving term (the term content gets transferred to)
- GitHub issue number (the issue requesting the merge)
If any are missing, ask before proceeding.
Step 1 — Run owltools merge
From src/ontology/:
owltools --use-catalog mondo-edit.obo \
--obsolete-replace MONDO:XXXXXXX MONDO:YYYYYYY \
-o -f obo mondo-edit.obo
Where MONDO:XXXXXXX = obsoleted, MONDO:YYYYYYY = surviving.
What owltools does:
- Renames the obsoleted term to
obsolete <original name> - Sets
is_obsolete: trueandreplaced_by: MONDO:YYYYYYYon the obsoleted term - Strips definition, comment, xrefs, synonyms, subsets, is_a, intersection_of, relationship, property_value from the obsoleted term
- Transfers xrefs, synonyms, subsets, is_a, relationships, property_values onto the surviving term — including stale "obsoletion-tracking" metadata (see Step 5)
- Adds the obsoleted term's name as a synonym on the surviving term, citing the obsoleted MONDO ID as evidence (must be fixed in Step 5)
Step 2 — Normalize immediately
make NORM
Then mv NORM mondo-edit.obo. This deduplicates source qualifiers on identical subset/xref/is_a lines and re-quotes property_value URIs that owltools mangles.
NORM does not dedupe synonyms across different scopes (e.g. an EXACT and a RELATED with the same text both stay) — handle in Step 5.
Step 3 — Locate both stanzas
Steps 4 to 6 edit src/ontology/mondo-edit.obo directly, one stanza at a time (see "Edits" in CLAUDE.md). Get the line numbers:
grep -n -E '^id: MONDO:(XXXXXXX|YYYYYYY)$' src/ontology/mondo-edit.obo
Read each stanza with offset/limit, never the whole file. Line numbers move after every edit, so grep again before the next Read.
Step 4 — Clean up the OBSOLETED term
The obsoleted stanza must contain ONLY the lines below. Delete anything else owltools left behind (def, comment, xref, synonym, subset, is_a, intersection_of, relationship, other property_value) — but only after verifying the content is on the surviving term.
| Allowed line | Source |
|---|---|
id: MONDO:XXXXXXX |
unchanged |
name: obsolete <original name> |
set by owltools |
property_value: IAO:0000231 MONDO:TermsMerged |
add manually (obsoletion reason) |
property_value: IAO:0000233 "https://github.com/monarch-initiative/mondo/issues/NNNN" xsd:anyURI |
add manually (issue link) |
is_obsolete: true |
set by owltools |
replaced_by: MONDO:YYYYYYY |
set by owltools |
Step 5 — Clean up the SURVIVING term
owltools transfers content but several things need manual attention:
Fix synonym evidence. owltools added a synonym like
synonym: "<obsoleted name>" EXACT [MONDO:XXXXXXX]. ReplaceMONDO:XXXXXXXwith one of the transferred xrefs (e.g.[Orphanet:NNNNNN]) — but only if that source actually uses the name. Picking any xref at random fabricates evidence. To confirm: either reuse a citation from the pre-merge obsolete stanza if the same synonym was already cited there, or open the xref at source (orpha.net/en/disease/detail/NNNNNN, etc.; for OMIM xrefs use theomimskill, never omim.org pages) and check the name appears as a label or synonym. If no transferred xref carries the name, leave[]and flag in the Step 8 summary. If the obsoleted name duplicates an existing synonym with a different scope, reconcile manually — pick the correct scope, drop the duplicate.Remove obsoletion-tracking metadata that came from the obsoleted term:
subset: obsoletion_candidatesubset: scheduled for obsoletion on or after(if present)property_value: IAO:0006012 "<date>" xsd:string(scheduled-obsoletion date — would otherwise claim the surviving term is scheduled for obsoletion)
Decide which definition to keep. Default = whichever the issue says is correct. If the issue is silent, keep the surviving term's existing definition. If the surviving term had no definition and the obsoleted one did, use the obsoleted one's. State the choice in the final summary so the user can override.
Keep redundant
is_a. If a transferredis_ais a superclass of anotheris_aalready on the surviving term (e.g.MONDO:0000001"disease" alongside a more specific class), keep it. Its{source=...}qualifiers record where that parent came from. Only anis_apointing at the obsoleted term itself is rewired (Step 6).Check for an unwanted
alt_id. Some owlt
Установить merge-terms в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл merge-terms?
Use when asked to merge two MONDO terms — obsoleting one and transferring its metadata to the surviving term
Как установить скилл merge-terms?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл merge-terms запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic