Lucie.Eckenberg-Friedlander | 23 Oct 17:35 2013

Parsing UNIPROT - line GN - get into trouble with the get_Annotations function

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 = "
--------------------------------------------------------------------------------------------
<HELP>    parseUniprot.pl -in_file <fichier> -output_dir <output_directory>
--------------------------------------------------------------------------------------------\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:image001.jpg <at> 01CED014.23875C80]

Please consider the environment before printing this email!

_______________________________________________
Bioperl-l mailing list
Bioperl-l <at> lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/bioperl-l

Gmane