UMLS::Interface::PathFinder - provides the path information


UMLS-Interface documentation  | view source Contained in the UMLS-Interface distribution.

Index


NAME

Top

UMLS::Interface::PathFinder - provides the path information for the modules in the UMLS::Interface package.

DESCRIPTION

Top

This package provides the path information about the CUIs in the UMLS for the modules in the UMLS::Interface package.

For more information please see the UMLS::Interface.pm documentation.

SYNOPSIS

Top

 use UMLS::Interface::CuiFinder;
 use UMLS::Interface::PathFinder;
 use UMLS::Interface::ErrorHandler;

 %params = ();

 $params{'realtime'} = 1;

 $cuifinder = UMLS::Interface::CuiFinder->new(\%params);
 die "Unable to create UMLS::Interface::CuiFinder object.\n" if(!$cuifinder);

 $pathfinder = UMLS::Interface::PathFinder->new(\%params, $cuifinder); 
 die "Unable to create UMLS::Interface::PathFinder object.\n" if(!$pathfinder);

 $concept = "C0037303";

 $depth = $pathfinder->_depth();
 print "The depth of the taxonomy is $depth\n";

 $array = $pathfinder->_pathsToRoot($concept);
 print "The paths from $concept to root: \n";
 foreach my $p (@{$array}) { 
    print "  => $p\n";
 }

 $mindepth = $pathfinder->_findMinimumDepth($concept);
 $maxdepth = $pathfinder->_findMaximumDepth($concept);
 print "The minimum depth of $concept is $mindepth\n";
 print "The maximum depth of $concept is $maxdepth\n";




 $concept1 = "C0037303"; $concept2 = "C0018563";

 $length = $pathfinder->_findShortestPathLength($concept1, $concept2);
 print "The length of the shortest path between $concept1 and $concept2 is $length\n";

 $array = $pathfinder->_findLeastCommonSubsumer($concept1, $concept2);
 print "The LCS(es) between $concept1 and $concept2 are: \n";
 foreach my $lcs (@{$array}) { 
    print "  => $lcs \n";
 }

 $array  = $pathfinder->_findShortestPath($concept1, $concept2);
 print "The shortest paths between $concept1 and $concept2 are:\n";
 foreach my $path (@{$array}) { 
    print "  => $path\n";
 }

INSTALL

Top

To install the module, run the following magic commands:

  perl Makefile.PL
  make
  make test
  make install

This will install the module in the standard location. You will, most probably, require root privileges to install in standard system directories. To install in a non-standard directory, specify a prefix during the 'perl Makefile.PL' stage as:

  perl Makefile.PL PREFIX=/home/sid

It is possible to modify other parameters during installation. The details of these can be found in the ExtUtils::MakeMaker documentation. However, it is highly recommended not messing around with other parameters, unless you know what you're doing.

SEE ALSO

Top

http://tech.groups.yahoo.com/group/umls-similarity/

http://search.cpan.org/dist/UMLS-Similarity/

AUTHOR

Top

Bridget T McInnes <bthomson@cs.umn.edu> Ted Pedersen <tpederse@d.umn.edu>

COPYRIGHT

Top


UMLS-Interface documentation  | view source Contained in the UMLS-Interface distribution.