This program authenticates user by asking for valid username and password to connect to UMLSKS. Once the user is authenticated program takes two terms from the user and finds the shortest path (semantic distance) and the semantic relatedness(hso) between those two concepts using the heirarchical structure of the UMLSKS Metathesaurus database. The program queries SNOMED-CT database with the CUIs user enters and displays the shortest path along with the concepts through which the two inputs are connected.
perl ws-getAllowablePath.pl --verbose 1 -sources SNOMEDCT,MSH --rels PAR --dirs U --config configfilename --login loginfile --log logfile --patterns patternsfile --testfile test_file
--verbose: Sets verbose flag to true if value is set to 1, and thus displays all the authentication information for the user.
--sources : UMLS sources can be specified by providing list of sources seperated by comma. These sources will be used to query and retrieve the information.
--rels : UMLS relations can be specified by providing list of relations seperated by comma. These relations will be used to query and retrieve the information.
--dirs : Directions for UMLS relations can be specified by providing list of directions seperated by comma. Different directions are U - Up , D - Down and H - Horizontal. These directions will be used to find the allowable path. The sequence of these directions should be same as the sequence of relations provided by the --rels option.
--config : Instead of providing sources, relations and directions on command line, they can be specified using a configuration file, which can be provided with this option. It takes complete path and name of the file. The config file is expected in following format:
--login : User can specify login credentials through the file, which should be of form:
--log : User can spacify the logfile name in which the log will be recorded. --verbose option must be set on to have log generated.
--patterns : User can specify the set of allowable patterns that should be used while calculating an allowable path. This options accepts a regex inside a file specified by patternsfile.
The regex may be of form :
U : upward arrow
D: downward arrow
H: Horizontal arrow
Each regex is seperated from another using | (or). Each regex represents one allowed pattern from the set.
Right now, the vector length of any size is allowed in the allowed direction,
\bU+\b : means a path which consists of one or more than one upward arrows is allowed.
--testfile : User can specify the list of test CUIs stored in the test_file throught this option. The program would generate output for all the CUI pairs sequentially.
Follwing is a sample output
This program uses following packages:
sub GetNeighbors::read_object which reads hash reference object passed to this sub and fetches the required Neighbors' information.
sub GetNeighbors::format_object calls appropriate functions like format_homogenous_hash, format_scalar, format_homogenous_array depending on the object reference it is called with. format_homogenous_hash,format_scalar and format_homogenous_array are subroutines which read the objects they are called with and fetch the desired information.
sub ConnectUMLS::get_pt to get the proxy ticket using a web service.
sub ConnectUMLS::connect_umls to connect to UMLS by sending username and password and getting back a proxy ticket.
sub ValidateTerm::validateTerm to accepts an input and validates it for as valid or invalid CUI or a term.
sub GetUserData::getUserDetails to get username and password from the user.
sub Query::runQuery which takes method name, service and other parameters as argument and calls the web service. It also displays the information received from the web service and other error messages.
sub FormGraph::form_graph forms graph using standard BFS algorithm and creates a graph using the concepts and their neighbor concepts. It finds shortest path between two input concepts and displays the path.
ValidateTerm.pm GetUserData.pm Query.pm ConnectUMLS.pm
Mugdha Choudhari University of Minnesota Duluth <chou0130 at d.umn.edu>
Ted Pedersen, University of Minnesota Duluth <tpederse at d.umn.edu>
Copyright (C) 2011, Mugdha Choudhari, Ted Pedersen
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.