Entering edit mode
Marcus Davy
▴
390
@marcus-davy-5153
Last seen 6.6 years ago
Hi,
I have had a look at FastqStreamer to stream in successive subsets of
a
Fastq file.
My question is whether you can change the number of records to stream
on
the fly rather than having to stream 'n' records each time.
For example, I might want to pull in records corresponding to each
Illumina
tile from the indices fetched within the Fastq header information,
or just fetch a certain tile with a record index range m:n which does
not
nessarily start at m=1 within the Fastq file.
sp <- SolexaPath(system.file('extdata', package='ShortRead'))
fl <- file.path(analysisPath(sp), "s_1_sequence.txt")
length(readFastq(f))
[1] 256
## This fails as n is expected to be a constant amount of streamed
records
f <- FastqStreamer(fl, c(100, 50, 100, 6))
Error in FastqStreamer(fl, c(100, 50, 100, 6)) :
'n' must be finite and >= 0
To fetch a certain tile can you alter the 'added' field position
similar to
'seek' in perl so you can grab only that index range of the Fastq
file
without having to go through a while loop?
f <- FastqStreamer(fl, 50)
print(f)
class: FastqStreamer
file: s_1_sequence.txt
status: n=50 current=0 added=0 total=0 ## <- I want to change the
'current/added fields'
cheers,
Marcus
[[alternative HTML version deleted]]