Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: <Lucie.Eckenberg-Friedlander <at> sanofi.com>
Subject: Parsing UNIPROT - line GN - get into trouble with the get_Annotations function
Newsgroups: gmane.comp.lang.perl.bio.general
Date: Wednesday 23rd October 2013 15:35:38 UTC (over 2 years ago)
Dear all,

I am actually developping a parser for UNIPROT.dat file.
I am using the Bio::SeqIO library (version 5.8.8).

I am building a SeqIO object and calling the different functions.

Everything is fine for these functions:
$seq_object->annotation->get_Annotations('date_changed')
$seq_object->annotation->get_Annotations('reference')
$seq_object->annotation->get_Annotations('comment')

excepting for :
$seq_object->annotation->get_Annotations('gene_name')
$seq_object->annotation->get_Annotations('synonyms')



See below my script :

#!/app/bin/perl

use Getopt::Long 2.00;
use strict;

use Bio::SeqIO;

## VARIABLES
my $h;
my $help;
my $in_file;
my $output_dir;
my $version;

my $usage = "
--------------------------------------------------------------------------------------------
    parseUniprot.pl -in_file  -output_dir 
--------------------------------------------------------------------------------------------\n";

unless(&GetOptions("help!",\$help,

           "h!",\$h,
           "help=s",\$help,
           "in_file=s",\$in_file,
           "output_dir=s",\$output_dir

          )){
    die $usage;
}

die $usage if($help || $h);

my $seq_object;
my $seqio_object = Bio::SeqIO->new(
                                    -format => 'swiss',
                                    -file => $in_file
                                 );

while ( $seq_object = $seqio_object->next_seq){

   ## $gene is not defined ???
   foreach my $gene ( $seq_object->annotation->get_Annotations('gene_name')
)
   {
      print "GN =".$gene->value()." ",$gene->text(),"\n";
      print "GN =".$gene."\n";
   }

   ## idem = $gene is not defined ???
   foreach my $gene ( $seq_object->annotation->get_Annotations('synonyms')
)
   {
          print "GN synonyms =".$gene."=\n";
   }


}

Thank you for your help.
Regards.


Lucie ECKENBERG-FRIEDLANDER
Project Manager
SDI - Translational Medecine Informatics
TÉL. : +33 (0) 1.58.93.88.39
13, quai Jules Guesde 94403 Vitry-sur-Seine Cedex - France

[cid:[email protected]]

Please consider the environment before printing this email!
 
CD: 3ms