Introduction

This document is a section of the Administration Guide.

Vocabulary Administration Overview

A set of administrative utilities are provided to manage the LexEVS Service. These utilities are provided for Windows (.bat) and Linux (.sh) operating systems. Each of the commands is located in the {LEXBIG_DIRECTORY}/admin and {LEXBIG_DIRECTORY}/test directory. A full description of the options with example is provided for each of the administration utilities.

Administrative Program

Description

ActivateScheme

Activates a coding scheme based on unique URN and version.
Options:

  • -u,-urn <urn> URN uniquely identifying the code system.
  • -v,-version <versionId> Version identifier.
  • -f,-force Force activation (no confirmation).

    Example:
    ActivateScheme -u "urn:oid:2.16.840.1.113883.3.26.1.1" -v "05.09e" 

ClearOrphanedResources

Clean up orphaned resources - databases and indexes.
Options:

  • -li,-listIndexes List all unused indexes.
  • -ldb, -listDatabases List all unused databases (with matching prefix).
  • -ri,-removeIndex <name> Remove the (unused) index with the given name.
  • -rdb,-removeDatabase <name> Remove the (unused) database with the given name.
  • -a,-all Remove all unreferenced indexes and databases (with matching prefix).

    Example:
    ClearOrphanedResources -li

DeactivateScheme

Deactivates a coding scheme based on unique URN and version.
Options:

  • -u,-urn <urn> URN uniquely identifying the code system.
  • -v,-version <versionId> Version identifier.
  • -d,-date <yyyy-MM-dd,HH:mm:ss> Date and time for deactivation to take effect; immediate if not specified.
  • -f,-force Force deactivation (no confirmation).

    Example:
    DeactivateScheme -u "urn:oid:2.16.840.1.113883.3.26.1.1" -v "05.09e" -d "01/31/2099,12:00:00" 

ExportLgXML

Exports content from the repository to a file in the LexGrid canonical XML format.
Options:

  • -out,-output <uri> URI or path of the directory to contain the resulting XML file. The file name will be automatically derived from the coding scheme name.
  • -u,-urn <name> URN or local name of the coding scheme to export.
  • -v,-version <id> The assigned tag/label or absolute version identifier of the coding scheme.
  • -nf,-noFail If specified, indicates that processing should not stop for recoverable errors
  • -f,-force If specified, allows the destination file to be overwritten if present.

    If the coding scheme and version values are unspecified, a list of available coding schemes will be presented for user selection.



    Examples:
     ExportLgXML -out "file:///path/to/dir" -nf -f
    ExportLgXML -out "file:///path/to/dir" u "NCI_Thesaurus" -v "PRODUCTION" -nf -f 

ExportOBO

Exports content from the repository to a file in the Open Biomedical Ontologies (OBO) format.
Options:

  • -out,-output <uri> URI or path of the directory to contain the resulting OBO file. The file name will be automatically derived from the coding scheme name.
  • -u, -urn <name> URN or local name of the coding scheme to export.
  • -v,-version <id> The assigned tag/label or absolute version identifier of the coding scheme.
  • -nf,-noFail If specified, indicates that processing should not stop for recoverable errors
  • -f,-force If specified, allows the destination file to be overwritten if present.

    If the coding scheme and version values are unspecified, a list of available coding schemes will be presented for user selection.



    Examples:
    ExportOBO -out "file:///path/to/dir" -nf -f
    ExportOBO -out "file:///path/to/dir" -u "FBbt" -v "PRODUCTION" -nf -f 

ExportOWL

Exports content from the repository to a file in OWL format.
Options:

  • -out,-output <uri> URI or path of the directory to contain the resulting OWL file. The file name will be automatically derived from the coding scheme name.
  • -u,-urn <name> URN or local name of the coding scheme to export.
  • -v,-version <id> The assigned tag/label or absolute version identifier of the coding scheme.
  • -nf,-noFail If specified, indicates that processing should not stop for recoverable errors
  • -f,-force If specified, allows the destination file to be overwritten if present.

    If the URN and version values are unspecified, a list of available coding schemes will be presented for user selection.



    Example:
    ExportOWL -out "file:///path/to/dir" -nf -f
    ExportOWL -out "file:///path/to/dir" -u "sample" -v "1.0" -nf -f 

ListExtensions

List registered extensions to the LexEVS runtime environment.
Options:

  • -a, -all List all extensions (default, override by specifying other options).
  • -i, -index List index extensions.
  • -m, -match List match algorithm extensions.
  • -s, -sort List sort algorithm extensions.
  • -g, -generic List generic extensions.

    Example:
    ListExtensions -a 

ListSchemes

List all currently registered vocabularies.
Options:

  • -b,-brief List only coding scheme name, version, urn, and tags (default).
  • -f,-full List full detail for each scheme.

    Example:
    ListSchemes 

LoadLgXML

Loads a vocabulary file, provided in LexGrid canonical xml format.
Options:

  • -in, -input <uri> URI specifying location of the source file.
  • -v, -validate <level> Perform validation of the candidate resource without loading data. If specified, the '-nf', -a' and '-t' options are ignored. Supported levels of validation include:
    • 0 = Verify document is well-formed
    • 1 = Verify document is valid
  • -nf, -noFail If specified, indicates that processing should not stop for recoverable errors.
  • -a, -activate ActivateScheme on successful load; if unspecified the vocabulary is loaded but not activated.
  • -t, -tag <tagID> An optional tag ID (e.g. 'PRODUCTION' or 'TEST') to assign.

    Load Example:
    LoadLgXML -in "file:///path/to/file.xml" -nf -a


    Validation Example:
    LoadLgXML -in "file:///path/to/file.xml" -v 0 

LoadNCIHistory

Imports NCI History data to the LexEVS repository.

Options:

The following figure displays the successful load of the sample vocabulary file.

screenshot of command window showing the successful load of the vocabulary file

Running the Sample Query Programs

A set of sample programs are provided in the {LEXBIG_DIRECTORY}/examples directory. To run the sample query programs successfully a vocabulary must have been loaded.

  1. Enter:
    cd {LEXBIG_DIRECTORY}/examples
  2. Execute one of sample programs. .bat for windows or .sh for Linux.

The following figure shows sample program output for finding properties and associations for a given code.
screenshot showing sample program output

Installing NCI Vocabularies

NCI Thesaurus Vocabulary

This section describes the steps to download and install a full version of the NCI Thesaurus for the LexEVS Service.

  1. Using a web or ftp client go to URL: ftp://ftp1.nci.nih.gov/pub/cacore/EVS/
    screenshot of navigating to the ftp client in Windows
  2. Select the version of NCI Thesaurus OWL you wish to download. Save the file to a directory on your machine.
  3. Extract the OWL file from the zip download and save in a directory on your machine. This directory will be referred to as NCI_THESAURUS_DIRECTORY
  4. Using the LexEVS utilities load the NCI Thesaurus
    cd {LexBIG_DIRECTORY}/admin
    For Windows installation use the following command:
    LoadNCIThesOWL.bat -nf -in "file:///{NCI_THESAURUS_DIRECTORY}/Thesaurus_05.12f.owl"
    For Linux installation use the following command:
    LoadNCIThesOWL.sh -nf -in "file:///{NCI_THESAURUS_DIRECTORY}/Thesaurus_05.12f.owl"

    This step will require about three hours on a Pentium 3.0 Ghz machine. The total time to load NCI Thesaurus will vary depending on machine, memory, and disk speed.

The following example shows output from load of NCI Thesaurus 05.12f:

 ...
 [LexBIG] Processing TOP Node... Retired_Kind
 [LexBIG] Clearing target of NCI_Thesaurus...
 [LexBIG] Writing NCI_Thesaurus to target...
 [LexBIG] Finished loading DB - loading transitive expansion table
 [LexBIG] ComputeTransitive - Processing Anatomic_Structure_Has_Location
 [LexBIG] ComputeTransitive - Processing Anatomic_Structure_is_Physical_Part_of
 [LexBIG] ComputeTransitive - Processing Biological_Process_Has_Initiator_Process
 [LexBIG] ComputeTransitive - Processing Biological_Process_Has_Result_Biological_Process
 [LexBIG] ComputeTransitive - Processing Biological_Process_Is_Part_of_Process
 [LexBIG] ComputeTransitive - Processing Conceptual_Part_Of
 [LexBIG] ComputeTransitive - Processing Disease_Excludes_Finding
 [LexBIG] ComputeTransitive - Processing Disease_Has_Associated_Disease
 [LexBIG] ComputeTransitive - Processing Disease_Has_Finding
 [LexBIG] ComputeTransitive - Processing Disease_May_Have_Associated_Disease
 [LexBIG] ComputeTransitive - Processing Disease_May_Have_Finding
 [LexBIG] ComputeTransitive - Processing Gene_Product_Has_Biochemical_Function
 [LexBIG] ComputeTransitive - Processing Gene_Product_Has_Chemical_Classification
 [LexBIG] ComputeTransitive - Processing Gene_Product_is_Physical_Part_of
 [LexBIG] ComputeTransitive - Processing hasSubtype
 [LexBIG] Finished building transitive expansion - building index
 [LexBIG] Getting a results from sql (a page if using mysql)
 [LexBIG] Indexed 0 concepts.
 [LexBIG] Indexed 5000 concepts.
 [LexBIG] Indexed 10000 concepts.
 [LexBIG] Indexed 15000 concepts.
 [LexBIG] Indexed 20000 concepts.
 [LexBIG] Indexed 25000 concepts.
 [LexBIG] Indexed 30000 concepts.
 [LexBIG] Indexed 35000 concepts.
 [LexBIG] Indexed 40000 concepts.
 [LexBIG] Indexed 45000 concepts.
 [LexBIG] Indexed 46000 concepts.
 [LexBIG] Getting a results from sql (a page if using mysql)
 [LexBIG] Closing Indexes Mon, 27 Feb 2006 01:44:22
 [LexBIG] Finished indexing

NCI Metathesaurus vocabulary

This section describes the steps to download and install a full version of the NCI Metathesaurus for the LexEVS Service.

  1. Using a web or ftp client go to URL: ftp://ftp1.nci.nih.gov/pub/cacore/EVS/
    screenshot of navigating to the ftp client in Windows
  2. Select the version of NCI Metathesaurus RRF you wish to download. Save the file to a directory on your machine.
  3. Extract the RRF files from the zip download and save in a directory on your machine. This directory will be referred to as NCI_METATHESAURUS_DIRECTORY.

    RELEASE_INFO.RRF is required to be present for the load utility to work.

  4. Using the LexEVS utilities load the NCI Thesaurus
    cd {LexBIG_DIRECTORY}/admin
    For Windows installation use the following command:
    LoadNCIMeta.bat -nf -in "file:///{NCI_METATHESAURUS_DIRECTORY}/" 
    For Linux installation use the following command:
    LoadNCIMeta.sh -nf -in "file:///{NCI_THESAURUS_DIRECTORY}/"

NCI Metathesaurus contains many individual vocabularies and requires several hours to load and index. This step requires about 15 hours on a Pentium 3.0 Ghz machine with 7200rpm disk. The total time to load NCI MetaThesaurus will vary depending on machine, memory, and disk speed.

NCI History

This section describes the steps to download and install a history file for NCI Thesaurus.

  1. Using a web or ftp client go to URL: ftp://ftp1.nci.nih.gov/pub/cacore/EVS/
  2. Select the version of NCI History you wish to download. Save the file to a directory on your machine. Select the VersionFile download to the same directory as the history file.
  3. Extract the History files from the zip download and save in a directory on your machine. This directory will be referred to as NCI_HISTORY_DIRECTORY
  4. Using the LexEVS utilities load the NCI Thesaurus:
    cd {LexBIG_DIRECTORY}/admin_*</tt>
    For Windows installation use the following command:
    LoadNCIHistory.bat -nf -in "file:///{NCI_HISTORY_DIRECTORY}" -vf "file:///NCI_HISTORY_DIRECTORY}/VersionFile"
    For Linux installation use the following command:
    LoadNCIHistory.sh -nf -in "file:///{NCI_HISTORY_DIRECTORY}" -vf "file:///NCI_HISTORY_DIRECTORY}/VersionFile" 

If a 'releaseId' occurs twice in the file, the last occurrence will be stored. If LexEVS already knows about a releaseId (from a previous history load), the information is updated to match what is provided in the file.

This file has to be provided to the load API on every load because you will need to maintain it in the future as each new release is made. We have created this file that should be valid as of today from the information that we found in the archive folder on your ftp server. You can find this file in the 'resources' directory of the LexEVS install.

Deactivating and Removing a Vocabulary

This section describes the steps to deactivate a coding scheme and remove coding scheme from LexEVS Service.

  1. Change directory to LexEVS administration directory. Enter:
    cd {LEXBIG_DIRECTORY}/admin_*
  2. Use the DeactiveScheme utility to prevent access to coding scheme. Once a coding scheme is deactivated, client programs will not be able to access the content for the specific coding scheme and version. Example:
    DeactivateScheme -u "urn:oid:2.16.840.1.113883.3.26.1.1" -v "05.12f" 
  3. Use RemoveScheme utility to remove coding scheme from LexEVS service and database. Example:
    RemoveScheme -u "urn:oid:2.16.840.1.113883.3.26.1.1" -v "05.12f" 

Tagging a Vocabulary

This section describes the steps to tag a coding scheme to be used via LexEVS API.

  1. Change directory to LexEVS administration directory and enter:
    cd {LEXBIG_DIRECTORY}/admin_*
  2. Use the TagScheme to tag a coding system and version with a local tag name (e.g. PRODUCTION). This tag name can be used via LexEVS API for query restriction. Example:
    TagScheme -u "urn:oid:2.16.840.1.113883.3.26.1.1" -v "05.12f"  -t "PRODUCTION" 
    |