[Bioperl-l] Genbank Bioperl help

Stefan A Kirov skirov@utk.edu
Wed, 12 Jun 2002 14:58:36 -0400 (EDT)


Use Bio::DB::GenPept for proteins!
Good luck!
Stefan

On Wed, 12 Jun 2002, Ali Al-Shahib wrote:

>
>Hi 
>
>I've got a set of accession numbers but they start with 'NP_' as they are 
>proteins.  I've used the genbank module (Bio::DB::GenBank) and produced 
>the following script:
>
>#!/usr/local/bin/perl -w
>
>use Bio::DB::GenBank;
>use Bio::Species;
>my $gb = new Bio::DB::GenBank;
>
>#get a particular accession number
>my $seq = $gb->get_Seq_by_acc('NP_347647');
>
>#get the sepecies from the 'sequence' object
>my $sp = $seq->species();
>
>#get the classification
>my @class = $sp->classification();
>
>#print out the result, line by line
>print join ("\n", @class), "\n";
>
>However it works for accssion numbers for nucleotide sequences but not of 
>protien sequences.  How can I change the script to make it fetch the 
>organsim name from genbank using the protein accession number which starts 
>with 'NP_' (example: NP_347647.1).  It fetches accession numbers like 
>AC021953, but not 'NP_.....'.
>
>I would greatly appreciate it if you can answer my query.
>
>Thank you in advance
>
>Ali
>-- 
>Mr Ali Al-Shahib
>Research Student
>Bioinformatics Research Centre
>Department of Computing Science
>17 Lilybank Gardens
>University of Glasgow
>Glasgow G12 8QQ
>Scotland, UK
>Tel: 0141 330 2421 (direct) 
>E-mail: alshahib@dcs.gla.ac.uk
>Web page: http://www.dcs.gla.ac.uk/~alshahib
>
>
>
>
>
>
>_______________________________________________
>Bioperl-l mailing list
>Bioperl-l@bioperl.org
>http://bioperl.org/mailman/listinfo/bioperl-l
>