Skip to main content
U.S. flag

An official website of the United States government

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock ( ) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

Unified Medical Language System® (UMLS®)

MetamorphoSys MRCXT Builder batch/shell scripts

Performing Batch MRCXT Builder Runs

This document is a guide to running the MetamorphoSys MRCXT Builder in a programmatic way rather than through the standard GUI interface.

Getting Started

To perform an scripted run of the MetamorphoSys MRCXT Builder you will need three things:

  1. An installed RRF Metathesaurus subset.
  2. MetamorphoSys installation (like an unpacked mmsys.zip file).
  3. JRE matching the version of the MetamorphoSys distribution.  An unpacked mmsys.zip file will contain a JRE directory you can use.

The easiest way to obtain all five pieces is to start with a UMLS distribution: downloaded files from the Knowledge Sources Server.   Run MetamorphoSys to generate an RRF subset of the data for which a MRCXT is to be built.

This process generates a MRCXT.RRF file from the existing MRCONSO.RRF and MRHIER.RRF files.  There are a number of configuration options you can use to change the result:

 

Configuring and Running a Script

In the sections below, you can follow a sample series of steps for putting together the pieces above into a script and actually generating a subset.

Windows

Consider the following script:

@echo off

REM
REM Specify RRF Directory
REM
set source_dir=C:\UMLS\METASUBSET

REM
REM Set Parameter properties
REM
set build_sibs=true
set build_children=true
set compute_xc=true
set versioned_sabs=true
set add_unicode_bom=true
set write_mrcxt_file_statistics=true
set max_contexts=true
set max_contexts_count=10


REM
REM Specify source list restriction (if desired) - in this case do not
REM
REM set source_list_prop="-Dselected.source.list=%source_list%"

REM
REM Specify MetamorphoSys directory
REM
set MMSYS_HOME=C:\UMLS\MMSYS

REM
REM Specify CLASSPATH
REM
set CLASSPATH=%MMSYS_HOME%;%MMSYS_HOME%\lib\jpf-boot.jar

REM
REM Specify JAVA_HOME
REM
set JAVA_HOME="%MMSYS_HOME%\jre\windows"

REM
REM Run from MMSYS_HOME to avoid release.dat errors
REM
cd %MMSYS_HOME%
%JAVA_HOME%\bin\javaw -Djava.awt.headless=true -Xms300M -Xmx1000M -Djpf.boot.config=%MMSYS_HOME%/etc/cxt.boot.properties -Dbuild.sibs=%build_sibs% -Dbuild.children=%build_children% -Dcompute.xc=%compute_xc% -Dversioned.sabs=%versioned_sabs% -Dadd.unicode.bom=%add_unicode_bom% -Dwrite.mrcxt.file.statistics=%write_mrcxt_file_statistics% -Dmax.contexts=%max_contexts% -Dmax.contexts.count=%max_contexts_count% -Dsource.dir=%source_dir% %source_list_prop% org.java.plugin.boot.Boot

The script sets the various configuration options, paths, and environment variables.  It then invokes a Java call from the MMSYS_HOME directory.  This will produce a MRCXT.RRF file in the specified directory.  A log of the progress will also be generated as it runs.

 


Linux, Macintosh, or Solaris

Consider the following script:

#!/bin/sh -f
#
# Set Parameter properties
#
build_sibs=true
build_children=true
compute_xc=true
versioned_sabs=true
add_unicode_bom=true
write_mrcxt_file_statistics=true
max_contexts=true
max_contexts_count=10
source_dir=/d1/UMLS/METASUBSET

#
# Set source list restriction (if desired) - do not in this case
#
# set source_list_prop=-Dselected.source.list=

#
# Specify MetamorphoSys directory
#
MMSYS_HOME=/d1/UMLS/MMSYS

#
# Specify CLASSPATH
#
CLASSPATH="${MMSYS_HOME}:$MMSYS_HOME/lib/mms.jar:$MMSYS_HOME/lib/objects.jar"

#
# Specify JAVA_HOME
#
JAVA_HOME=$MMSYS_HOME/jre/linux

#
# Run from MMSYS_HOME to avoid release.dat errors
#
export MMSYS_HOME
export CLASSPATH
export JAVA_HOME
cd $MMSYS_HOME

$JAVA_HOME/bin/java -Djava.awt.headless=true -Xms300M -Xmx1000M \
-Djpf.boot.config=$MMSYS_HOME/etc/cxt.boot.properties -Dbuild.sibs=$build_sibs \
-Dbuild.children=$build_children -Dcompute.xc=$compute_xc \
-Dversioned.sabs=$versioned_sabs -Dadd.unicode.bom=$add_unicode_bom \
-Dwrite.mrcxt.file.statistics=$write_mrcxt_file_statistics -Dmax.contexts=$max_contexts \
-Dmax.contexts.count=$max_contexts_count -Dsource.dir=$source_dir \
$source_list_prop org.java.plugin.boot.Boot

The script sets the various configuration options, paths, and environment variables.  It then invokes a java call from the MMSYS_HOME directory. This will produce a MRCXT.RRF file in the specified directory.  A log of the progress will also be generated as it runs.

Last Reviewed: July 29, 2016