ALBD
view release on metacpan or search on metacpan
utils/runDiscovery.pl view on Meta::CPAN
# CONSTANT STRINGS
###############################################################################
my $usage = "Error Running LBD, Usage Instructions:\n\n"
." runDiscovery LBD_CONFIG_FILE [OPTIONS]\n\n"
."FLAGS\n"
." --debug Print EVERYTHING to STDERR.\n"
." --help Print this help screen.\n"
." --version Print the version number\n"
."\nOPTIONS\n"
." --assocConfig path to the UMLS::Association Config File\n"
." --interfaceConfig path to the UMLS::Interface Config File\n"
."\nUSAGE EXAMPLES\n"
." runDiscovery lbdConfigFile\n";
;
#############################################################################
# Parse command line options
#############################################################################
my $DEBUG = 0; # Prints EVERYTHING. Use with small testing files.
my $HELP = ''; # Prints usage and exits if true.
my $VERSION;
#set default param values
my %options = ();
$options{'assocConfig'} = '';
$options{'interfaceConfig'} = '';
#grab all the options and set values
GetOptions( 'debug' => \$DEBUG,
'help' => \$HELP,
'version' => \$VERSION,
'assocConfig=s' => \$options{'assocConfig'},
'interfaceConfig=s' => \$options{'interfaceConfig'},
);
#Check for version or help
if ($VERSION) {
print "current version is ".(ALBD->version())."\n";
exit;
}
if ($HELP) {
&showHelp();
exit;
}
############################################################################
# Begin Running LBD
############################################################################
$options{'lbdConfig'} = shift;
defined $options{'lbdConfig'} or die ($usage);
my $lbd = ALBD->new(\%options);
$lbd->performLBD();
############################################################################
# function to output help messages for this program
############################################################################
sub showHelp() {
print "This utility takes an lbd configuration file and outputs\n";
print "the results of lbd to file. The parameters for LBD are\n";
print "specified in the input file. Please see samples/lbd or\n";
print "samples/thresholding for sample input files and descriptions\n";
print "of parameters and full details on what can be in an LBD input\n";
print "file.\n";
print "\n";
print "Usage: runDiscovery.pl LBD_CONFIG_FILE [OPTIONS]\n";
print "\n";
print "General Options:\n\n";
print "--help displays help, a quick summary of program\n";
print " options\n";
print "--assocConfig path to a UMLS::Association configuration\n";
print " file. Default location is \n";
print " '../config/association'. Replace this file\n";
print " for your computer to avoid having to specify\n";
print " each time.\n";
print "--interfaceConfig path to a UMLS::Interface configuration\n";
print " file. Default location is \n";
print " '../config/interface'. Replace this file \n";
print " for your computer to avoid having to specify\n";
print " each time.\n";
print "--debug enter debug mode\n";
print "--version prints the current version to screen\n";
};
( run in 1.116 second using v1.01-cache-2.11-cpan-39bf76dae61 )