ivci:nuva-utils

This is an old revision of the document!


Python utilities to handle NUVA

A library available on GitHub allows to retrieve and explore NUVA. It is a work in progress, that will be progressively enriched to provide metrics on code systems based upon their mapping to NUVA codes.

The supported functions are so far:

get_nuva_version()

Returns the version index for the last publication of NUVA.

get_nuva(version)

Uploads in the current directory the referenced version in RDF/XML format as nuva_ans.rdf, and creates a rebased version nuva_ivci.rdf.

split_nuva()

From the uploaded nuva_ivci.rdf file, creates a split version as a collection of files in RDF/Turtle format:

  • nuva_core.ttl including the concepts for vaccines, valences, target diseases and their labels in English
  • nuva_lang_XX.ttl includes all translations for language XX
  • nuva_refcode_YYY.ttl includes the concepts and the NUVA alignments for code system YYY
refturtle_to_map(code)

Starting from the nuva_refcode_YYY.ttl file for the given code, creates a simple CSV file nuva_refcode_YYY.csv with alignments between the given code and NUVA.

map_to_turtle(code)

Assuming that the nuva_refcode_YYY.csv file has been copied to work file nuva_code_YYY.csv, then edited for enhancing the alignments, creates a Turtle work file nuva_code_YYY.ttl for further processing.

query_core(q)

Runs a SPARQL query q against the core graph loaded from nuva_core.ttl

query_code(q,code)

Runs a SPARQL query q against a graph formed by merging nuva_core.ttl and the work file nuva_code_YYY.ttl, thus allowing to run checks and measures on the alignment.

  • ivci/nuva-utils.1704462527.txt.gz
  • Last modified: 2024/01/05 13:48
  • by fkaag