[Bioperl-l] How do you change the default on Bio::DB::GenBank?

Hilmar Lapp hlapp at gnf.org
Wed Jul 2 20:20:55 EDT 2003


OK so I traced the history. The string 'protein' as value for parameter  
db was introduced about a year ago (!) in version 1.44 of  
DB::GenBank.pm. It is also present up to 1.2.1 and was only fixed on  
June 10 this year, almost exactly one year later.

For the bioperl humour book of records, the guy who doesn't remember  
how it came in in the first place is the same who introduced it, and  
who recently also fixed it. I guess we're all overworked. This alone is  
worth having a beer together.

I'm sure the only reason it has never come up before for a whole year  
is that it was simply ignored or overridden. If you look at NCBIHelper  
there are actually circumstances under which it gets overridden from a  
query object. I don't have time to track down why at all it worked  
before and what finally exposed it; it could even be the fact that the  
name of the database (gb versus gp) was also submitted to NCBI and that  
that overwrote the choice of protein or nucleotide, but that NCBI now  
changed that.

At any rate, it was a bloody bad bug that amazingly managed to sit  
around silent for a year, and it has been fixed on both main trunk and  
branch. One more reason to get 1.2.2 out ASAP.

	-hilmar

On Wednesday, July 2, 2003, at 06:42  PM, Jason Stajich wrote:

> I'm pretty sure Lincoln has threatended to remove Bio::DB::GenBank from
> Bioperl if NCBI changes the interface again...
>
> I really don't see where you have the defaults for 'db'=> 'protein' in
> Bioperl - what version of the code are you using.  I think remember a
> release having that bug but I see 'db' => 'nucleotide' on both main  
> trunk
> and the branch.
>
> -jason
>
> On Wed, 2 Jul 2003, Mark Wilkinson wrote:
>
>> Hi Hilmar,
>>
>> Try that bit of code - I've followed it in the debugger and it does
>> query the protein database.  As far as I can tell, it is hard-coded to
>> do so by default - the defaults for 'simple', and 'batch' and so on  
>> are
>> all db=>'protein'
>>
>> I notice that Boulder::Genbank also broke as of Friday.  I've tracked
>> down the line in that module that is causing the problems and now I  
>> have
>> it working again, but I think GB must have tweaked their interface  
>> last
>> week.  Prior to this, the query sent out by Boulder::Genbank defaulted
>> to db=n, but that stopped working on Friday around noon.  It now must
>> make it explicitly db=nucleotide in order for Boulder:Genbank to work.
>> I'm sending the bug report and patch to Lincoln, but he's at the
>> C.elegans meeting so it might not get fixed for a while (if he  
>> confirms
>> that the error is what I believe it is)
>>
>> M
>>
>>
>> On Wed, 2003-07-02 at 16:44, Hilmar Lapp wrote:
>>> This is strange. DB::GenBank should query the nucleotide databank
>>> whereas DB::GenPept is for querying the protein databank. You use
>>> different modules for the two queries, not the same with a different
>>> initialization parameter.
>>>
>>> 	-hilmar
>>>
>>>> -----Original Message-----
>>>> From: Mark Wilkinson [mailto:markw at illuminae.com]
>>>> Sent: Wednesday, July 02, 2003 3:32 PM
>>>> To: bioperl-l at bioperl.org
>>>> Subject: [Bioperl-l] How do you change the default on
>>>> Bio::DB::GenBank?
>>>>
>>>>
>>>> Hi BioPerlers,
>>>>
>>>> Can someone tell me how to change the default db name in
>>>> Bio::DB::GenBank?  I've spent the past two hours in debug
>>>> mode and can't see any point at which an argument for the
>>>> database name is even tested
>>>> - it is coded to default to 'protein' which isn't very useful to me.
>>>> Such a switch doesn't appear anywhere in the documentation
>>>> either as far as I can tell.  I took a guess and thought the
>>>> following would work:
>>>>
>>>> use Bio::DB::GenBank;
>>>> my $gb = Bio::DB::GenBank->new(-db=>"nucleotide");
>>>> print $gb->get_Seq_by_acc("AF005495");
>>>>
>>>> But that still sends out a GET request to the protein database:
>>>>
>>> http://www.ncbi.nlm.nih.gov/entrez/eutils/ 
>>> efetch.fcgi?retmode=text&retty
>>> pe=gb&db=protein&tool=bioperl&id=J00522&usehistory=n
>>>
>>> Whereas what I want it to do is:
>>>
>>> http://www.ncbi.nlm.nih.gov/entrez/eutils/ 
>>> efetch.fcgi?retmode=text&retty
>>> pe=gb&db=nucleotide&tool=bioperl&id=J00522&usehistory=n
>>>
>>>
>>> Help please :-)
>>>
>>> Cheers all!
>>>
>>> M
>>
>
> --
> Jason Stajich
> Duke University
> jason at cgt.mc.duke.edu
>
-- 
-------------------------------------------------------------
Hilmar Lapp                            email: lapp at gnf.org
GNF, San Diego, Ca. 92121              phone: +1-858-812-1757
-------------------------------------------------------------



More information about the Bioperl-l mailing list