[Bioperl-l] Swissprot query - Help!

Brian Osborne brian_osborne at cognia.com
Tue Mar 15 16:43:26 EST 2005


Well, I think my example code got you into this, I think I should help you

You can't actually query Swissprot this way, using those text values and
field names, you can only do these text queries using Genbank currently.
You'd use Bio::DB::Query::GenBank for this, not Bio::DB::GenBank. If you
want to query Swissprot you're limited to ids and accession numbers. I will
clarify the HOWTO, it's a bit unclear on this point.

Brian O.

-----Original Message-----
From: bioperl-l-bounces at portal.open-bio.org
[mailto:bioperl-l-bounces at portal.open-bio.org]On Behalf Of SG Edwards
Sent: Tuesday, March 15, 2005 1:38 PM
To: bioperl-l at bioperl.org
Subject: [Bioperl-l] Swissprot query - Help!

Hi, sorry for the obvious question but I'm really new to Perl/BioPerl!!

I want to run a script that sends a query to swissprot and returns the list
sequences as Seq objects. I have tried the following code which throws an
exception 'MSG: Must speciy a value for uids to query'.

use Bio::DB::SwissProt;

$query = "Arabidopsis[ORGN] AND topoisomerase[TITL]";

$sp_obj = Bio::DB::SwissProt->new;

$stream_obj = $sp_obj->get_Stream_by_query($query);

while ($seq_obj = $stream_obj->next_seq) {
#print out the id
    print $seq_obj->display_id, "\n";


Any help is greatly appreciated!
Bioperl-l mailing list
Bioperl-l at portal.open-bio.org

More information about the Bioperl-l mailing list