Skills Agentes

Ontology Term Resolution

Resuelve etiquetas científicas en texto libre a IDs de ontología y valida CURIEs existentes contra el EBI Ontology Lookup Service (OLS4), para anotar tejido, tipo celular, enfermedad, fenotipo o metadatos de envío como GEO o ENA.

Solicitaread write edit bash
Estrellas
34.8k

en todo el repo

Actividad
56

0–100, la ruta de este skill

Actualizado
el mes pasado

último commit aquí

Commits
1

últimos 90 días

Contexto
1.9k tok

202 tok en reposo

Paquete
7 archivos

54 KB

Instalar

Funciona con cualquier agente que lea SKILL.md

npx -y skills add K-Dense-AI/scientific-agent-skills --skill ontology-term-resolution --agent claude-code

Se instala solo en este repositorio.

Este skill makes network requests.

Qué hace

  • Resuelve texto libre (p.ej. 'liver') a un CURIE de ontología mediante búsquedas en vivo en OLS4, escalando de exact a token a fulltext
  • Valida CURIEs existentes contra OLS4 y reporta si son válidos, obsoletos, mal formados o de la ontología equivocada
  • Devuelve el match_type de cada resultado (exact_label, exact_synonym, partial, unresolved) para que un humano decida en casos no exactos
  • Ofrece código de salida apto para CI (0 ok, 1 fallo, 2 error de uso o red) al validar una tabla de metadatos
  • Documenta comportamientos de la API OLS4 que pueden inducir a error, como que exact=true no equivale a exact_label

Úsalo cuando

  • Hay que anotar campos de tejido, tipo celular, enfermedad, fenotipo, ensayo, químico, organismo, sexo o estadio de desarrollo
  • Se preparan metadatos para envío a GEO, ENA, BioSamples, CELLxGENE, HCA o ISA-Tab
  • Se audita una tabla de metadatos con IDs de ontología ya existentes
  • Se necesita comprobar si un término está obsoleto y qué lo reemplazó, o mapear entre ontologías

No lo uses cuando

    Qué lo activa

    Di cualquiera de estas frases y el agente debería cargar este skill.

    • ¿Cuál es el ID UBERON para 'ventrículo izquierdo del corazón'?
    • Valida estos CURIEs de mi tabla de metadatos contra OLS4
    • Comprueba si EFO:0001067 está obsoleto y qué lo reemplaza

    SKILL.md

    En inglés

    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.

    Every ID this skill emits comes from a live OLS lookup. Every ID it is handed gets verified.

    Two directions

    Direction Script Question answered
    text → ID scripts/resolve_terms.py What is the term for "left ventricle"?
    ID → verdict scripts/validate_terms.py Is EFO:0001067 real, current, and labelled what this file claims?

    Both take single values or files, emit TSV or JSON, and need no packages beyond the standard library.

    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           label  ontology  match_type   strategy  defining_ontology
    liver   1     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) → tokenfulltext and stops at the first strategy that returns anything, reporting which one fired. --exact-only disables the ladder. --branch UBERON:0000465 restricts candidates to descendants of a term.

    Read match_type before using a result. exact_label and exact_synonym are safe; partial means OLS returned its best guess for a string that does not exist as written, and needs a human decision. unresolved is a legitimate output — see references/curation-rules.md for the normalisations worth retrying first.

    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
    python3 validate_terms.py --input tissue_ids.tsv \
        --branch UBERON:0000465 --expect-ontology uberon
    
    Status Meaning Verdict
    ok Exists, current, consistent with everything asserted pass
    matched_synonym Claimed label is a synonym; primary label differs warn
    imported_only Home ontology no longer asserts this ID warn
    not_a_class Term is a property or individual warn
    not_found No such term fail
    obsolete Obsoleted; replacement gives the successor when one exists fail
    label_mismatch ID and claimed label describe different things fail
    wrong_ontology Right kind of ID, wrong ontology for this column fail
    wrong_branch Not a descendant of the required root fail
    malformed_curie Not of the form PREFIX:local fail

    --strict promotes warnings to failures.

    API behaviour that will mislead you

    These are verified against the live service and are the reason this skill ships scripts rather than a recipe. Full detail in references/ols4-api.md.

    Trap Consequence
    exact=true is exact token matching liver returns 161 hits in UBERON; adding queryFields=label returns 1
    /search never returns is_obsolete or term_replaced_by Named in fieldList they are dropped silently; only term detail can answer "is this ID still current"
    ontology=efo returns MONDO and CL hits Ontologies import each other; filter on the CURIE prefix yourself
    The same term appears once per importing ontology Deduplicate on obo_id, keep is_defining_ontology: true
    The obo_id index has holes MONDO:0000001 is live but unindexed by obo_id; an IRI fallback is required to avoid a false not_found
    IRIs are not all OBO PURLs EFO and Orphanet use their own namespaces — resolve IRIs, do not template them
    OxO is retired Returns HTML with HTTP 200; use term cross-references or SSSOM instead
    A branch check does not exclude cell types from anatomy CARO puts cell under anatomical structure; constrain the prefix too

    Choosing the ontology

    MONDO for disease, HP for phenotype, UBERON for tissue, CL for cell type, EFO for assay, ChEBI for compounds, NCBITaxon for organism, PATO for sex and for normal. Prefix-to-OLS-id mappings (HP is served as hp, Orphanet as ordo), branch roots for --branch, and the overlapping-ontology judgement calls are in references/ontology-registry.md.

    Reporting results

    Give the ID and the label, and say how each was matched. A table of bare IDs cannot be reviewed. State unresolved terms explicitly rather than filling them with the nearest hit.

    References

    • references/ols4-api.md — endpoints, parameters, response fields, and every verified trap.
    • references/ontology-registry.md — prefix/ontology-id table, branch roots, which ontology owns which concept.
    • references/curation-rules.md — candidate-selection procedure, normalisations to retry, auditing an existing table, obsolete terms, cross-ontology mapping.

    Reproducido de K-Dense-AI/scientific-agent-skills bajo licencia MIT. Leer esta página en markdown.

    Archivos

    7 archivos en el paquete. Solo se lee SKILL.md al activarse — las referencias se cargan si el skill decide que las necesita.

    Antes de instalar

    Requiere Python 3.11+ y acceso de red a https://www.ebi.ac.uk/ols4; los scripts solo usan la librería estándar, sin API key.

    Necesita en el PATH:python3

    Detalles

    Creador
    K-Dense-AI
    Categoría
    Investigación
    Licencia
    MIT
    Recursos incluidos
    scripts en python + referencias
    Código fuente
    Ver SKILL.md

    Etiquetas

    Más de K-Dense-AI/scientific-agent-skills

    Este repo incluye 163 skills. Si instalas uno, normalmente ya tienes los demás.

    Gestión integral de citas académicas: busca en OpenAlex, PubMed y Google Scholar, extrae metadatos precisos, valida citas y genera entradas BibTeX correctamente formateadas.

    Costo de contexto al activarse
    3.7k tok
    Tamaño del paquete
    21 archivos
    Última actualización
    hace 28 días
    investigacion

    Realiza revisiones bibliográficas sistemáticas y completas usando varias bases académicas (PubMed, arXiv, bioRxiv, Semantic Scholar). Genera markdown y PDF con citas verificadas en varios estilos (APA, Nature, Vancouver).

    Costo de contexto al activarse
    3.2k tok
    Tamaño del paquete
    12 archivos
    Última actualización
    hace 15 días
    investigacion

    Crea decks de diapositivas y presentaciones para charlas de investigación: PowerPoint, presentaciones de conferencia, seminarios, defensas de tesis. Da estructura, plantillas, guía de tiempos y validación visual.

    Costo de contexto al activarse
    5.1k tok
    Tamaño del paquete
    24 archivos
    Última actualización
    hace 15 días
    documentos

    Crea infografías profesionales con Nano Banana Pro AI y refinamiento iterativo inteligente. Usa Gemini 3.6 Flash para revisar la calidad e integra investigación con Perplexity Sonar. Soporta 10 tipos, 8 estilos y paletas para daltonismo.

    Costo de contexto al activarse
    2.7k tok
    Tamaño del paquete
    8 archivos
    Última actualización
    hace 15 días
    diseno ui

    Crea pósteres de investigación profesionales en LaTeX con beamerposter, tikzposter o baposter, para conferencias y comunicación científica: layout, colores, columnas múltiples e integración de figuras.

    Costo de contexto al activarse
    3.9k tok
    Tamaño del paquete
    17 archivos
    Última actualización
    hace 15 días
    documentos

    Crea diagramas científicos de calidad de publicación con la IA Nano Banana 2 y refinamiento iterativo inteligente. Gemini 3.6 Flash revisa la calidad y solo regenera si está por debajo del umbral de tu tipo de documento.

    Costo de contexto al activarse
    4.1k tok
    Tamaño del paquete
    6 archivos
    Última actualización
    hace 15 días
    diseno ui

    Skills relacionados

    Astropy

    34.8k

    Librería Python central para astronomía y astrofísica: unidades/cantidades, coordenadas, E/S de FITS, tablas, sistemas de tiempo, WCS y cosmología, para implementar o depurar código con Astropy.

    Costo de contexto al activarse
    3.6k tok
    Tamaño del paquete
    8 archivos
    Última actualización
    el mes pasado
    investigacion

    Integración con el SDK de Python de Benchling y su API REST para entidades del registro, inventario, entradas del cuaderno electrónico (ELN), workflows, Benchling Apps y consultas al Data Warehouse.

    Costo de contexto al activarse
    1.9k tok
    Tamaño del paquete
    6 archivos
    Última actualización
    el mes pasado
    investigacion

    Busca papers científicos y obtiene datos experimentales estructurados extraídos de estudios a texto completo vía el servidor MCP de BGPT: más de 25 campos por paper (métodos, resultados, muestras, calidad, conclusiones).

    Costo de contexto al activarse
    713 tok
    Tamaño del paquete
    1 archivo
    Última actualización
    el mes pasado
    investigacion