Table of Contents

Running MetaMap:

To run the MetaMap program from the command line, you have two options:
  1. Put the directory containing the MetaMap program in the PATH environment variable and then you can run MetaMap from any directory.
    # in C Shell (csh or tcsh)
    setenv PATH <parent dir>/public_mm/bin:$PATH

    # in Bourne Again Shell (bash)
    export PATH=<parent dir>/public_mm/bin:$PATH

    # Bourne Shell (sh)
    PATH=<parent dir>/public_mm/bin:$PATH
    export PATH

  2. You can simply run the MetaMap command by specifying the full path to the command.
    <parent dir>/public_mm/bin/metamap09
    Whichever option you decide on, the command line statement to run MetaMap is:
    % metamap09 [Options] [InputFile] [OutputFile]
    For more information on MetaMap usage, please refer to MetaMap 2009 Usage (HTML), or use the MetaMap help command:
    % metamap09 --help

Examples:

Note: The pathnames in the examples below are those from the NLM site; your pathnames will differ.

More examples are available in MetaMap Options and Examples (PDF - 50 kb)

MetaMap with no options on a simple term from standard input
% ./bin/metamap09
/test/linux/public_mm/bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 \
 -w /test/linux/public_mm/lexicon /test/linux/public_mm/bin/metamap09.BINARY -Z 09

MetaMap (2009)



Control options:
  mm_data_year=09
Berkeley DB databases (normal strict 09 model) are open.
Static variants will come from table varsan in /test/linux/public_mm/DB/BDB4/DB.normal.09.strict.
Derivational Variants: Adj/noun ONLY.
Accessing lexicon /test/linux/public_mm/lexicon/data/BDB4/lexiconStatic2009.
Variant generation mode: static.

|: Obstructive Sleep Apnea
|: 
Established connection to Tagger Server on localhost.
Processing 00000000.tx.1: Obstructive Sleep Apnea

Phrase: "Obstructive Sleep Apnea"
Meta Candidates (11):
  1000 Obstructive sleep apnoea (Sleep Apnea, Obstructive) [Disease or Syndrome]
   901 Apnea, Sleep (Sleep Apnea Syndromes) [Disease or Syndrome]
   827 APNOEA (Apnea) [Pathologic Function]
   827 Sleep [Organism Function]
   827 Obstructive (Obstructed) [Functional Concept]
   827 Apnea (Apnea Adverse Event) [Finding]
   793 Sleeping (Asleep) [Finding]
   755 Obstruction [Individual Behavior,Pathologic Function]
   755 Sleepy [Finding]
   755 Sleeplessness [Sign or Symptom]
   755 Obstruction (Obstruction within Medical Device) [Phenomenon or Process]
Meta Mapping (1000):
  1000 Obstructive sleep apnoea (Sleep Apnea, Obstructive) [Disease or Syndrome]
|: 
	      

MetaMap on a small MEDLINE Abstract to a named output file.
% metamap09 cit00000 cit00000.output 
/test/linux/public_mm/bin/SKRrun -L 2009 -M /DATA/XDR -B /BDB4 \
 -w /test/linux/public_mm/lexicon /test/linux/public_mm/bin/metamap09.BINARY -Z 09
		
MetaMap (2009)
		
/nfsvol/nls/bin/SKRrun -L 2009 /nfsvol/nls/bin/metamap09.BINARY -Z 09


Control options:
 mm_data_year=09
Berkeley DB databases (normal strict 09 model) are open.
Static variants will come from table varsan in /test/linux/public_mm/DB/BDB4/DB.normal.09.strict.
Derivational Variants: Adj/noun ONLY.
Accessing lexicon /test/linux/public_mm/lexicon/data/BDB4/lexiconStatic2009.
Variant generation mode: static.

Beginning to process cit00000 sending output to cit00000.output.
Tagging will be done dynamically.
Processing 9337195.ti.1: Obstructive Sleep Apnea
Established connection to Tagger Server on localhost.

Batch processing is finished.
%
	      

MetaMap will populate the output file cit00000.output with the processed contents of cit00000.