Gene Interaction Extraction

From Clairlib
Jump to: navigation, search

In this tutorial you will learn how to use Clairlib in one Bioinformatics application; i.e. Gene Interaction Extraction. Specifically, you will learn to do the following:

  • Tag the Genes in a given sentence.
  • Tag the interaction words in a sentence.
  • Extract the interactions from a given sentence.

To be able to perform the tasks above, you need to make sure that you installed both the Geneia Tagger and the Stanford Parser, and configured Clairlib to properly use them by uncommenting the following lines and pointing the variables in them to the correct paths.

 #$STANFORD_PARSER_PATH = "/path/to/stanford-parser";
 #$GENIATAGGER_PATH = "/path/to/genia-tagger"; 

Then, create an instance of Clair::Bio::GIN

use Clair::Bio::GIN;
my $gin = new Clair::Bio::GIN();

Tag the Genes in a given sentence

If you have the sentence

my $sentence = "We provide evidence of a cross-talk between nuclear receptor",
              " and Ser / Thr protein phosphatases and show that vitamin D",
              " receptor (VDR) interacts with the catalytic subunit of protein",
              " phosphatases, PP1c and PP2Ac, and induces their enzymatic",
              " activity in a ligand-dependent manner.";

You can tag the genes in the that sentence by

my @genes = @{$gin->tag_genes($sentence)}; 
foreach my $gene (@genes){
     print $gene,"\n";

Tag the interaction words in a sentence

Or, you can tag and print the interaction words

my @int_words = @{$gin->tag_interaction_words($sentence)}; 
foreach my $word (@int_words){
     print $word,"\n";

Extract genes' interactions from a text

To extract the interactions from the sentence use

@interactions = $gin->extract_interactions;

The returned array is an array of Clair::Bio::GIN::Interaction instances. You can print the information of those interactions using

foreach my $interaction (@interactions){
    print "Gene 1: ", $interaction->get_gene1(),"\n";
    print "Gene 2: ", $interaction->get_gene2(),"\n";
    print "Interaction Word: ",$interaction->get_interaction_word(),"\n\n"; 
Personal tools

Main Menu
Clairlib Lab