diff --git a/CHANGELOG b/CHANGELOG index 319910d..3f4905c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,11 @@ NAME UMLS::Interface CHANGES + Changes from version 1.31 to 1.33 + 1. Updated documentation + + 2. Added getIntrinsicIC function and corresponding util/ program + Changes from version 1.29 to 1.31 1. modified ICFinder.pm to return an error if the icfrequency information does not match the configuration file -- similar to what we diff --git a/INSTALL b/INSTALL index 6f15314..c8c889b 100644 --- a/INSTALL +++ b/INSTALL @@ -256,9 +256,10 @@ Stage 3 - Install MySQL, if already installed go to Stage 4 Stage 4 - Install UMLS, if already installed go to Stage 5 - VERSION - The UMLS-Interface requires version UMLS 2008AA or higher + The UMLS-Interface requires version UMLS 2008AA or higher. + + Directionsmodified for installation version 2012AA. REMINDER If you already have the UMLS installed, make certain that you have the @@ -314,8 +315,8 @@ Stage 4 - Install UMLS, if already installed go to Stage 5 3. -2-meta.nlm 4. mmsys.zip 5. .CHK - 6. Copyright_Notice.txt - 7. README.txt + 6. Copyright_Notice.txt + 7. README.txt Step 2: Unzip the mmsys.zip file (unzip mmsys.zip) The following should be created: 1. linux_mmsys.sh 2. solaris_mmsys.sh @@ -323,7 +324,7 @@ Stage 4 - Install UMLS, if already installed go to Stage 5 Step 3: Run MetamorphoSys (the install wizard) -- Run the appropriate .sh file for your system - --> I ran ./linux_mmsys.sh + --> I ran ./run_linux.sh -- Click 'Install UMLS' @@ -334,6 +335,8 @@ Stage 4 - Install UMLS, if already installed go to Stage 5 box is checked. Although, I installed all three of the Knowledge Sources: 'Metathesaurus', 'Semantic Network' and 'SPECIALIST Lexicon and Lexical Tools'. + - Choose the mysql database for the Semantic Network load + scripts - Click 'OK' -- 'Install UMLS' and 'MetamorphoSys Configuration' windows will appear @@ -367,7 +370,8 @@ Stage 5 - Load UMLS into MySQL, if already installed go to Stage 6 Step 1: Create the MySQL database Log into MySQL and create a database called 'umls' as follows: - CREATE DATABASE IF NOT EXISTS umls CHARACTER SET utf8 COLLATE utf8_unicode_ci; + CREATE DATABASE IF NOT EXISTS umls CHARACTER SET utf8 COLLATE + utf8_unicode_ci; Step 2: Modify the 'my.cnf' file. This has been put in a different place every version or distribution @@ -385,12 +389,15 @@ Stage 5 - Load UMLS into MySQL, if already installed go to Stage 6 performance, the MySQL 5 server requires changing buffer sizes to make use of the memory available. - key_buffer = 300M - table_cache = 300 - sort_buffer_size = 20M - read_buffer_size = 20M - query_cache_limit = 3M - query_cache_size = 100M + key_buffer = 600M + table_cache = 300 + sort_buffer_size = 20M + read_buffer_size = 200M + query_cache_limit = 3M + query_cache_size = 100M + myisam_sort_buffer = 200M + bulk_insert_buffer_size = 100M + join_buffer_size = 100M Also make certain that this file is readable in order to run this as non-root. To change permission on it: chmod gou+r /etc/my.cnf diff --git a/MANIFEST b/MANIFEST index b7408d1..2e0a32e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -177,6 +177,7 @@ utils/getCuiDef.pl utils/getCuiList.pl utils/getExtendedDef.pl utils/getIC.pl +utils/getIntrinsicIC.pl utils/getParents.pl utils/getRelated.pl utils/getRelations.pl diff --git a/META.yml b/META.yml index 17600d2..7960e92 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: UMLS-Interface -version: 1.31 +version: 1.33 abstract: Perl interface to the Unified Medical Language System (UMLS) author: - Bridget McInnes , Ted Pedersen , Serguei Pakhomov , Siddharth Patwardhan diff --git a/Makefile.PL b/Makefile.PL index ea157f0..cb1f0d2 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -24,7 +24,7 @@ WriteMakefile( 'Digest::SHA1' => '2.12', 'File::Spec' => '3.31', 'File::Path' => '2.08'}, - 'EXE_FILES' => [("utils/removeConfigData.pl", "utils/findLeastCommonSubsumer.pl", "utils/findPathToRoot.pl", "utils/findShortestPath.pl", "utils/getChildren.pl", "utils/getParents.pl", "utils/getCuiDef.pl", "utils/getExtendedDef.pl", "utils/getRelated.pl", "utils/getRelations.pl", "utils/getStDef.pl", "utils/getAssociatedTerms.pl", "utils/getAssociatedCuis.pl", "utils/findCuiDepth.pl", "utils/getSts.pl","utils/getSemanticGroup.pl", "utils/getSemanticRelation.pl", "utils/findDFS.pl", "utils/getTableNames.pl", "utils/getCuiList.pl", "utils/getIC.pl", "utils/getStString.pl", "utils/findShortestPathLength.pl", "utils/getCompounds.pl", "utils/findNumberOfCloserConcepts.pl")], + 'EXE_FILES' => [("utils/removeConfigData.pl", "utils/findLeastCommonSubsumer.pl", "utils/findPathToRoot.pl", "utils/findShortestPath.pl", "utils/getChildren.pl", "utils/getParents.pl", "utils/getCuiDef.pl", "utils/getExtendedDef.pl", "utils/getRelated.pl", "utils/getRelations.pl", "utils/getStDef.pl", "utils/getAssociatedTerms.pl", "utils/getAssociatedCuis.pl", "utils/findCuiDepth.pl", "utils/getSts.pl","utils/getSemanticGroup.pl", "utils/getSemanticRelation.pl", "utils/findDFS.pl", "utils/getTableNames.pl", "utils/getCuiList.pl", "utils/getIC.pl", "utils/getIntrinsicIC.pl", "utils/getStString.pl", "utils/findShortestPathLength.pl", "utils/getCompounds.pl", "utils/findNumberOfCloserConcepts.pl")], 'dist' => {'COMPRESS' => 'gzip -9f', 'SUFFIX' => 'gz'}, ($] >= 5.005 ? ('ABSTRACT_FROM' => 'lib/UMLS/Interface.pm', # retrieve abstract from module diff --git a/lib/UMLS/Interface.pm b/lib/UMLS/Interface.pm index aa66cfe..eb49ed6 100644 --- a/lib/UMLS/Interface.pm +++ b/lib/UMLS/Interface.pm @@ -1,5 +1,5 @@ # UMLS::Interface -# (Last Updated $Id: Interface.pm,v 1.132 2012/06/23 20:51:41 btmcinnes Exp $) +# (Last Updated $Id: Interface.pm,v 1.135 2013/04/08 11:35:23 btmcinnes Exp $) # # Perl module that provides a perl interface to the # Unified Medical Language System (UMLS) @@ -421,7 +421,7 @@ my $pkg = "UMLS::Interface"; use vars qw($VERSION); -$VERSION = '1.31'; +$VERSION = '1.33'; my $debug = 0; @@ -1973,6 +1973,71 @@ sub getIC { return $ic; } +=head3 getSecoIntrinsicIC + +description: + + returns the intrinsic information content of a given cui using + the formula proposed by Seco, Veale and Hayes 2004 + +input: + + $concept <- string containing a cui + +output: + + $double <- double containing its IC + +example: + + use UMLS::Interface; + my $umls = UMLS::Interface->new(); + my $concept = "C0018563"; + my $double = $umls->getSecoIntrinsicIC($concept); + print "The Intrinsic IC of $concept is $double\n"; + +=cut +sub getSecoIntrinsicIC { + my $self = shift; + my $concept = shift; + + my $ic = $icfinder->_getSecoIntrinsicIC($concept); + + return $ic; +} +=head3 getSanchezIntrinsicIC + +description: + + returns the intrinsic information content of a given cui using + the formula proposed by Sanchez and Batet 2011 + +input: + + $concept <- string containing a cui + +output: + + $double <- double containing its IC + +example: + + use UMLS::Interface; + my $umls = UMLS::Interface->new(); + my $concept = "C0018563"; + my $double = $umls->getSanchezIntrinsicIC($concept); + print "The Intrinsic IC of $concept is $double\n"; + +=cut +sub getSanchezIntrinsicIC { + my $self = shift; + my $concept = shift; + + my $ic = $icfinder->_getSanchezIntrinsicIC($concept); + + return $ic; +} + =head3 getProbability description: diff --git a/lib/UMLS/Interface/CuiFinder.pm b/lib/UMLS/Interface/CuiFinder.pm index 42525c5..3475667 100644 --- a/lib/UMLS/Interface/CuiFinder.pm +++ b/lib/UMLS/Interface/CuiFinder.pm @@ -1,5 +1,5 @@ # UMLS::Interface::CuiFinder -# (Last Updated $Id: CuiFinder.pm,v 1.76 2011/07/28 18:25:45 btmcinnes Exp $) +# (Last Updated $Id: CuiFinder.pm,v 1.77 2012/06/24 11:16:07 btmcinnes Exp $) # # Perl module that provides a perl interface to the # Unified Medical Language System (UMLS) diff --git a/lib/UMLS/Interface/ICFinder.pm b/lib/UMLS/Interface/ICFinder.pm index c1c76bb..c5088ff 100644 --- a/lib/UMLS/Interface/ICFinder.pm +++ b/lib/UMLS/Interface/ICFinder.pm @@ -1,5 +1,5 @@ # UMLS::Interface::ICFinder -# (Last Updated $Id: ICFinder.pm,v 1.26 2012/06/23 20:51:41 btmcinnes Exp $) +# (Last Updated $Id: ICFinder.pm,v 1.31 2013/04/17 13:44:57 btmcinnes Exp $) # # Perl module that provides a perl interface to the # Unified Medical Language System (UMLS) @@ -70,6 +70,10 @@ my $configN = 0; my $errorhandler = ""; my $cuifinder = ""; +my %leafs = (); +my %subsumers = (); +my $max_leaves = 0; + # UMLS-specific stuff ends ---------- # -------------------- Class methods start here -------------------- @@ -223,10 +227,161 @@ sub _getN my $function = "_getN"; &_debug($function); + if($configN == 0) { + my $hash = $cuifinder->_getCuiList(); + $configN = keys %{$hash}; + } return $configN; } +# returns the intrinsic information content (IC) of a cui +# input : $concept <- string containing a cui +# output: $double <- double containing its IC +sub _getSecoIntrinsicIC +{ + my $self = shift; + my $concept = shift; + + my $function = "_getIC"; + &_debug($function); + + # check self + if(!defined $self || !ref $self) { + $errorhandler->_error($pkg, $function, "", 2); + } + + # check concept was obtained + if(!$concept) { + $errorhandler->_error($pkg, $function, "Error with input variable \$concept.", 4); + } + + # check if valid concept + if(! ($errorhandler->_validCui($concept)) ) { + $errorhandler->_error($pkg, $function, "Concept ($concept) in not valid.", 6); + } + + my $children = $cuifinder->_getChildren($concept); + + my $n = _getN(); + + my $children_num = ($#{$children}) + 2; + my $ic = 1 - ( (log($children_num)/log(10)) / (log($n)/log(10)) ); + + return $ic; +} + +######################################################################### +# Depth First Search (DFS) +######################################################################### +sub _getSubsumers +{ + my $concept = shift; + my $array = shift; + + if($concept=~/^\s*$/) { return; } + + # if concept is one of the following just return + #C1274012|Ambiguous concept (inactive concept) + if($concept=~/C1274012/) { return; } + #C1274013|Duplicate concept (inactive concept) + if($concept=~/C1274013/) { return; } + #C1276325|Reason not stated concept (inactive concept) + if($concept=~/C1276325/) { return; } + #C1274014|Outdated concept (inactive concept) + if($concept=~/C1274014/) { return; } + #C1274015|Erroneous concept (inactive concept) + if($concept=~/C1274015/) { return; } + #C1274021|Moved elsewhere (inactive concept) + if($concept=~/C1274021/) { return; } + #C2733115|limited status concept + if($concept=~/C2733115/) { return; } + + # set the new path + my @path = @{$array}; + push @path, $concept; + + my $series = join " ", @path; + + # get all the children + my $children = $cuifinder->_getChildren($concept); + + $subsumers{$concept}++; + if($#{$children} < 0) { + $leafs{$concept}++; + } + + # search through the children + foreach my $child (@{$children}) { + + # check if child cui has already in the path + my $flag = 0; + foreach my $cui (@path) { + if($cui eq $child) { + $flag = 1; + } + } + + # if it isn't continue on with the depth first search + if($flag == 0) { + &_getSubsumers($child, \@path); + } + } +} + +# returns the intrinsic information content (IC) of a cui +# input : $concept <- string containing a cui +# output: $double <- double containing its IC +sub _getSanchezIntrinsicIC +{ + my $self = shift; + my $concept = shift; + + my $function = "_getIC"; + &_debug($function); + + # check self + if(!defined $self || !ref $self) { + $errorhandler->_error($pkg, $function, "", 2); + } + + # check concept was obtained + if(!$concept) { + $errorhandler->_error($pkg, $function, "Error with input variable \$concept.", 4); + } + + # check if valid concept + if(! ($errorhandler->_validCui($concept)) ) { + $errorhandler->_error($pkg, $function, "Concept ($concept) in not valid.", 6); + } + + %leafs = (); %subsumers = (); my @path = (); + _getSubsumers($concept, \@path); + + my $leaves = keys %leafs; + my $subsumes = keys %subsumers; + + my $a = $leaves/$subsumes; $a++; + my $b = _getMaxLeaves(); $b++; + + my $ic = -1 * ( (log( $a/$b )/log(10)) ); + + return $ic; +} + +sub _getMaxLeaves { + + if($max_leaves == 0) { + + my @path = (); %leafs = (); %subsumers = (); + _getSubsumers($cuifinder->_root(), \@path); + $max_leaves = keys %leafs; + %leafs = (); %subsumers = (); + } + + return $max_leaves; +} + # returns the information content (IC) of a cui # input : $concept <- string containing a cui # output: $double <- double containing its IC @@ -252,7 +407,7 @@ sub _getIC if(! ($errorhandler->_validCui($concept)) ) { $errorhandler->_error($pkg, $function, "Concept ($concept) in not valid.", 6); } - + # if option frequency then the propagation hash # hash has not been loaded and we should determine # the information content of the concept using the diff --git a/lib/UMLS/Interface/PathFinder.pm b/lib/UMLS/Interface/PathFinder.pm index a6fb714..0573371 100644 --- a/lib/UMLS/Interface/PathFinder.pm +++ b/lib/UMLS/Interface/PathFinder.pm @@ -1,5 +1,5 @@ # UMLS::Interface::PathFinder -# (Last Updated $Id: PathFinder.pm,v 1.54 2012/06/23 20:51:41 btmcinnes Exp $) +# (Last Updated $Id: PathFinder.pm,v 1.56 2013/04/17 13:44:57 btmcinnes Exp $) # # Perl module that provides a perl interface to the # Unified Medical Language System (UMLS) @@ -444,12 +444,12 @@ sub _pathsToRoot { # check to make certain the configuration file only contains # heirarchical relations (PAR/CHD or RB/RN). - my @relations = split/\s*\,\s*/, $relationstring; - foreach my $rel (@relations) { - if(! ($rel=~/(PAR|CHD|RB|RN)/) ) { - $errorhandler->_error($pkg, $function, "Method only supports heirarhical relations (PAR/CHD or RB/RN).", 10); - } - } + #my @relations = split/\s*\,\s*/, $relationstring; + #foreach my $rel (@relations) { + #if(! ($rel=~/(PAR|CHD|RB|RN)/) ) { + #$errorhandler->_error($pkg, $function, "Method only supports heirarhical relations (PAR/CHD or RB/RN).", 10); + #} + #} # if the realtime option is set get the paths otherwise # they are or should be stored in the database @@ -612,6 +612,8 @@ sub _createIndex { my $indexname = "$tableName" . "_CUIINDEX"; my $index = $sdb->do("create index $indexname on $tableName (CUI)"); $errorhandler->_checkDbError($pkg, $function, $sdb); + + print "Index created.\n\n"; } # creates the index containing all of the path to root information diff --git a/utils/getIC.pl b/utils/getIC.pl index 9110d33..271f98e 100755 --- a/utils/getIC.pl +++ b/utils/getIC.pl @@ -6,7 +6,7 @@ =head1 NAME =head1 SYNOPSIS -This program takes in a CUI or a term and returns its definitions. +This program takes in a CUI or a term and returns its information content. =head1 USAGE @@ -352,7 +352,7 @@ () # function to output the version number ############################################################################## sub showVersion { - print '$Id: getIC.pl,v 1.18 2011/08/29 16:37:03 btmcinnes Exp $'; + print '$Id: getIC.pl,v 1.19 2013/04/08 08:21:54 btmcinnes Exp $'; print "\nCopyright (c) 2008, Ted Pedersen & Bridget McInnes\n"; } diff --git a/utils/getIntrinsicIC.pl b/utils/getIntrinsicIC.pl new file mode 100755 index 0000000..bb7b96a --- /dev/null +++ b/utils/getIntrinsicIC.pl @@ -0,0 +1,329 @@ +#!/usr/bin/perl + +=head1 NAME + +getIntrinsicIC.pl - This program returns the intrinsic information content of a concept or a term. + +=head1 SYNOPSIS + +This program takes in a CUI or a term and returns its intrinsic information +content. + +=head1 USAGE + +Usage: getIntrinsicIC.pl [OPTION] [CUI|TERM] + +=head1 INPUT + +=head2 Required Arguments: + +=head3 [CUI|TERM} + +Concept Unique Identifier (CUI) or a term from the Unified Medical +Language System (UMLS) + +=head2 Optional Arguments: + +=head3 --sanchez + +Use the formula proposed by Sanchez and Betet 2011 + +=head3 --seco [default] + +Use the formula proposed by Seco, Veale and Hayes 2005 + +=head3 --config FILE + +This is the configuration file. The format of the configuration +file is as follows: + +SAB :: + +REL :: + +RELA :: (optional) + +For example, if we wanted to use the MSH vocabulary with only +the RB/RN relations, the configuration file would be: + +SAB :: include MSH +REL :: include RB, RN +RELA :: include inverse_isa, isa + +or + +SAB :: include MSH +REL :: exclude PAR, CHD + +If you go to the configuration file directory, there will +be example configuration files for the different runs that +you have performed. + +=head3 --infile + +Takes a file of CUIs (one per line) and returns their information +content. + +=head3 --debug + +Sets the debug flag for testing + +=head3 --username STRING + +Username is required to access the umls database on MySql +unless it was specified in the my.cnf file at installation + +=head3 --password STRING + +Password is required to access the umls database on MySql +unless it was specified in the my.cnf file at installation + +=head3 --hostname STRING + +Hostname where mysql is located. DEFAULT: localhost + +=head3 --socket STRING + +The socket your mysql is using. DEFAULT: /tmp/mysql.sock + +=head3 --database STRING + +Database contain UMLS DEFAULT: umls + +=head4 --help + +Displays the quick summary of program options. + +=head4 --version + +Displays the version information. + +=head1 OUTPUT + +List of CUIs that are associated with the input term + +=head1 SYSTEM REQUIREMENTS + +=over + +=item * Perl (version 5.8.5 or better) - http://www.perl.org + +=back + +=head1 AUTHOR + + Bridget T. McInnes, University of Minnesota + +=head1 COPYRIGHT + +Copyright (c) 2007-2009, + + Bridget T. McInnes, University of Minnesota + bthomson at cs.umn.edu + + Ted Pedersen, University of Minnesota Duluth + tpederse at d.umn.edu + + Siddharth Patwardhan, University of Utah, Salt Lake City + sidd@cs.utah.edu + + Serguei Pakhomov, University of Minnesota Twin Cities + pakh0002@umn.edu + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 2 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT +ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program; if not, write to: + + The Free Software Foundation, Inc., + 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +=cut + +############################################################################### + +# THE CODE STARTS HERE +############################################################################### + +# ================================ +# COMMAND LINE OPTIONS AND USAGE +# ================================ + + +use UMLS::Interface; +use Getopt::Long; + +eval(GetOptions( "version", "help", "debug", "infile=s", "username=s", "password=s", "hostname=s", "database=s", "socket=s", "config=s", "sanchez", "seco")) or die ("Please check the above mentioned option(s).\n"); + + +# if help is defined, print out help +if( defined $opt_help ) { + $opt_help = 1; + &showHelp(); + exit; +} + +# if version is requested, show version +if( defined $opt_version ) { + $opt_version = 1; + &showVersion(); + exit; +} + +# At least 1 CUI should be given on the command line. +if(!(defined $opt_infile) && scalar(@ARGV) < 1) { + print STDERR "No term or file was specified on the command line\n"; + &minimalUsageNotes(); + exit; +} + + +my $umls = ""; +my %option_hash = (); + +if(defined $opt_config) { + $option_hash{"config"} = $opt_config; +} +if(defined $opt_verbose) { + $option_hash{"verbose"} = $opt_verbose; +} +if(defined $opt_debug) { + $option_hash{"debug"} = $opt_debug; +} +if(defined $opt_username) { + $option_hash{"username"} = $opt_username; +} +if(defined $opt_driver) { + $option_hash{"driver"} = $opt_driver; +} +if(defined $opt_database) { + $option_hash{"database"} = $opt_database; +} +if(defined $opt_password) { + $option_hash{"password"} = $opt_password; +} +if(defined $opt_hostname) { + $option_hash{"hostname"} = $opt_hostname; +} +if(defined $opt_socket) { + $option_hash{"socket"} = $opt_socket; +} + +$umls = UMLS::Interface->new(\%option_hash); +die "Unable to create UMLS::Interface object.\n" if(!$umls); + +$umls->setPropagationParameters(\%option_hash); + +my @array = (); +if(defined $opt_infile) { + open(FILE, $opt_infile) || die "Could not open $opt_infile\n"; + while() { + chomp; + push @array, $_; + } +} +else { + my $input = shift; + push @array, $input; +} + +foreach my $input (@array) { + my $term = $input; + my $c = undef; + + if($input=~/C[0-9]+/) { + push @{$c}, $input; + my $terms = $umls->getConceptList($input); + $term = shift @{$terms}; + } + else { + $c = $umls->getConceptList($input); + } + + my $printFlag = 0; + my $precision = 4; + my $floatformat = join '', '%', '.', $precision, 'f'; + foreach my $cui (@{$c}) { + # make certain cui exists in this view + if($umls->exists($cui) == 0) { print STDERR "$cui\n"; next; } + + my $ic = 0; + + if(defined $opt_sanchez) { + $ic = $umls->getSanchezIntrinsicIC($cui); + } + else { + $ic = $umls->getSecoIntrinsicIC($cui); + } + # my $pic = sprintf $floatformat, $ic; + # my $pprob = sprintf $floatformat, $prob; + + print "The intrinsic information content of $term ($cui) is $ic\n"; + } +} + +############################################################################## +# function to output minimal usage notes +############################################################################## +sub minimalUsageNotes { + + print "Usage: getIntrinsicIC.pl [OPTIONS] [CUI|TERM] \n"; + &askHelp(); + exit; +} + +############################################################################## +# function to output help messages for this program +############################################################################## +sub showHelp() { + + + print "This is a utility that takes as input a term \n"; + print "or a CUI and returns its intrinsic information content (IC).\n\n"; + + print "Usage: getIntrinsicIC.pl [OPTIONS] [CUI|TERM]\n\n"; + + print "Options:\n\n"; + + print "--config FILE Configuration file\n\n"; + + print "--debug Sets the debug flag for testing\n\n"; + + print "--username STRING Username required to access mysql\n\n"; + + print "--password STRING Password required to access mysql\n\n"; + + print "--hostname STRING Hostname for mysql (DEFAULT: localhost)\n\n"; + + print "--database STRING Database contain UMLS (DEFAULT: umls)\n\n"; + + print "--socket STRING Socket used by mysql (DEFAULT: /tmp.mysql.sock)\n\n"; + + print "--version Prints the version number\n\n"; + + print "--help Prints this help message.\n\n"; +} + +############################################################################## +# function to output the version number +############################################################################## +sub showVersion { + print '$Id: getIntrinsicIC.pl,v 1.2 2013/04/08 11:35:23 btmcinnes Exp $'; + print "\nCopyright (c) 2008, Ted Pedersen & Bridget McInnes\n"; +} + +############################################################################## +# function to output "ask for help" message when user's goofed +############################################################################## +sub askHelp { + print STDERR "Type getIntrinsicIC.pl --help for help.\n"; +} +