Skip to content
Prev 3373 / 21318 Next

[Bioc-devel] FastqStreamer error in function context

On 05/09/2012 09:53 PM, Thomas Girke wrote:
Hi Thomas --

The example below fails because there are 256 records in the file, so 
for me the 52nd yield() returns length(fq) == 1 and the subset '2' is 
out of bounds. But maybe there is another example?
For the first part, after the fact we have

 > f
class: FastqStreamer
file: s_1_sequence.txt
status: n=5 current=1 added=256 total=256

with 'total=256' indicating that the streamer iterated over (i.e., the 
file had) 256 records. This is actually accessible in the reference 
class using the not-really-public (see the last lines of 
example(FastqStreamer)) accessor

 > f$status()
       n current   added   total
       5       1     256     256

which is a named integer vector. Is this what you were looking for?

I'll give the idea about selecting specific records some thought; I see 
how it could be useful.

Martin