[Bioperl-l] results problem with StandAloneBlast

Jason Stajich jason at bioperl.org
Mon Jun 5 09:02:02 EDT 2006


On Jun 5, 2006, at 5:57 AM, Sendu Bala wrote:

> Chris Fields wrote:
>>
>> On Jun 4, 2006, at 9:08 AM, Jason Stajich wrote:
>>
>>> If you want to rewind the parser then (assuming you are using a
>>> filestream and not a data stream from the web or zcat or something)
>>> just reset the filehandle
>>> seek($searchio->_fh, 0);
>>>
>>> but then you'll have to re-parse everything and pay that cost  
>>> twice -
>>> it makes more sense to me to just save the results and put them in
>>> list if you are going to deliberately make two passes over all the
>>> results.    You either pay the cost of memory (keeping all the
>>> objects) or time (reparse the results).
>>
>> I agree there isn't any really good reason to rewind the parser; I  
>> was
>> mainly just curious how this was accomlished.
>
> Didn't you already explain why seeking a SearchIO wouldn't work? And
> indeed, didn't Genevieve already try to do this after I suggested  
> it and
>   found that it didn't work?
>
> Confused...
>
There is an internal _rewind if you are using the next_XX methods  
that resets the internal iterator (all the data has already been  
parsed).

You >>can<< reseek the internal filehandle (accessible by calling  
$object->_fh ), but you can't call seek on the searchio object itsself.

> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

--
Jason Stajich
Duke University
http://www.duke.edu/~jes12




More information about the Bioperl-l mailing list