[Bioperl-l] Parsing UNIPROT - line GN - get into trouble with the get_Annotations function
Lucie.Eckenberg-Friedlander at sanofi.com
Lucie.Eckenberg-Friedlander at sanofi.com
Wed Oct 23 15:35:38 UTC 2013
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!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 2206 bytes
Desc: image001.jpg
URL: <http://lists.open-bio.org/pipermail/bioperl-l/attachments/20131023/8c7ac9d7/attachment-0002.jpg>
More information about the Bioperl-l
mailing list