[Bioperl-l] Question about retrieving sequences from swissprot database

cacaucenturion2 cacaucenturion2 at gmail.com
Sun Jul 28 23:35:28 EDT 2013


Hi all,

I met a problem when trying to retrieve sequences from SWISSPROT. I tried the following script

perl -e 'use Bio::Perl; $seq_object = get_sequence('swissprot',"Q197F7");' 

However I was told that 

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: acc Q197F7 does not exist
STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/local/share/perl5/Bio/Root/Root.pm:368
STACK: Bio::DB::WebDBSeqI::get_Seq_by_acc /usr/local/share/perl5/Bio/DB/WebDBSeqI.pm:195
STACK: Bio::Perl::get_sequence /usr/local/share/perl5/Bio/Perl.pm:520
STACK: -e:1


I have confirmed that Q197F7 does exist (http://www.uniprot.org/uniprot/Q197F7) so this result seems irreasonable.


I tried the example given here http://search.cpan.org/~cjfields/BioPerl-1.6.901/Bio/DB/SwissProt.pm
but it still does not work (similar error: MSG: id does not exist).

 use Bio::DB::SwissProt;

    $sp = Bio::DB::SwissProt->new();

    $seq = $sp->get_Seq_by_id('KPY1_ECOLI'); # SwissProt ID
    # <4-letter-identifier>_<species 5-letter code>
    # or ...
    $seq = $sp->get_Seq_by_acc('P43780'); # SwissProt AC      
    # [OPQ]xxxxx


    # In fact in this implementation 
    # these methods call the same webscript so you can use 
    # then interchangeably

    # choose a different server to query
    $sp = Bio::DB::SwissProt->new('-servertype' => 'expasy',
                                 '-hostlocation' => 'us');

    $seq = $sp->get_Seq_by_id('BOLA_HAEIN'); # SwissProtID
Could any one help me figure it out?  

Thank you so much!


#################################################################################
Cacau Centurion



More information about the Bioperl-l mailing list