The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME SemRep::Interface - A suite of Perl modules that utilize path information present in the Semantic Medline Database in order to calculate the semantic association between two concepts in the UMLS.

INSTALL 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.

DESCRIPTION This package provides a Perl interface to

DATABASE SETUP The interface assumes you have installed the Semantic Medline Database onto your MYSQL server and in addition, followed the steps present in the INSTALL file to create the appropriate auxilary tables in order to speed up program runtime. The name of the database can be passed through during program runtime but will default to 'SemMedDB' if no parameter is given.

The SemMedDB database must contain the following tables: 1. CONCEPT 2. CONCEPT_SEMTYPE 3. PREDICATION_ARGUMENT 4. PREDICATION 5. SENTENCE_PREDICATION 6. SENTENCE 7. CITATIONS 8. PREDICATION_AGGREGATE 9. DISTINCT_PREDICATION_AGGREGATE *

*The table 'DISTINCT_PREDICATION_AGGREGATE' does not install alongside the Semantic Medline Database via the .SQL file provided on their website. Steps must be followed in the INSTALL file to set-up this table. Failure to do so will cause fatal errors at runtime.

A script inside the INSTALL file details the steps needed to generate the required auxilary tables. These steps are to be done following the Semantic Medline Database install and may take up to several days to complete due to the size of the database.

INITIALIZING THE MODULE

To create an instance of the interface module, using default values for all configuration options:

use SemRep::Interface;
my $interface = new SemRep::Interface();

findPathLength

description:

Utilizes a breadth first search to find the path length from a source_concept to a destination_concept

input:

$source_concept <- string containing the concept id of the cui to start seraching from
$destination_concept <- string containing the concept id you are searching for

output:

length of path   <- Non-negative Integer indicating length of path between the two concepts

example:

 #finds path length between Heart and Myocardial Infarction
 use SemRep::Interface;
 my $interface = new SemRep::Interface(); 
	 
 my $pathlength = $interface->findPathLength("C0018787", "C0027061");
 

findPathSCore

description:

Function utilizing a breadth first search along with UMLS::Association to find the aggregate association score
along the path between source_concept and destination_concept

input:

$source_concept <- string containing the concept id of the cui to start seraching from
$destination_concept <- string containing the concept id you are searching for
$measure <- string containing the UMLS::Association statistic measure to aggregate along paths.

output:

Aggregate association score   <- Non-negative float indicating the aggregate path score

example:

 #finds aggregate association score between Heart and Myocardial Infarction
 use SemRep::Interface;
 my $interface = new SemRep::Interface(); 
	 
 my $score = $interface->findPathLength("C0018787", "C0027061", "tscore");