[Bioperl-l] PullHSP bug

Chris Fields cjfields at illinois.edu
Thu Dec 4 16:49:05 UTC 2008


On Dec 4, 2008, at 9:12 AM, Hilmar Lapp wrote:

>
> On Dec 2, 2008, at 9:40 PM, Chris Fields wrote:
>
>> It appears the problem boils down to a small inconsistency with the  
>> way blank IDs are handled between the two BLAST parsers.  The  
>> regular blast parser explicitly sets this to '', while blast_pull  
>> leaves it undef.  When one constructs a LocatableSeq w/o an ID it  
>> dies, but '' works, hence the problem.  I don't think using '' is a  
>> real solution though (seems like something added to silence errors).
>
>
> I agree. Using '' where a value is expected is an ugly kludge. Is it  
> possible to fix this?
>
> 	-hilmar
> -- 
> ===========================================================
> : Hilmar Lapp  -:-  Durham, NC  -:-  hlapp at gmx dot net :
> ===========================================================

It's fixed.  I added a force_nse() flag to LocatableSeq which sets per- 
instance and allows get_nse to make an NSE under circumstances where  
the seq ID is undefined.  LocatableSeqs which lack an ID but have the  
flag explicitly get something like '/$start-$end' instead of throwing  
an exception (the default).  The flag is off by default, so you will  
still get an exception in case leaving off the ID was unintentional  
(didn't want any silent bugs sneaking through).

This solution may not be optimal.  The NSE is currently used for  
indexing LocatableSeqs and checking for possible collisions in  
SimpleAlign.  One gets a warning in the latter case ("Replacing one  
sequence [$nse]"), so maybe that's enough.

chris





More information about the Bioperl-l mailing list