Closed blaiseli closed 5 years ago
The pull request seems to fix the error obtained using the first approach (through do
... end
).
The second approach failed due to me not using NoopStream
correctly.
The following works:
julia> stream = NoopStream(open(fq_filename))
TranscodingStream{Noop,IOStream}(<mode=idle>)
julia> reader = FASTQ.Reader(stream)
FASTX.FASTQ.Reader{TranscodingStream{Noop,IOStream}}(BioGenerics.Automa.State{TranscodingStream{Noop,IOStream}}(TranscodingStream{Noop,IOStream}(<mode=idle>), 1, 1, false), nothing)
I would like to be able to parse gzipped fastq files through a
TranscodingStream
, but for a start, I'm trying on a non-gzipped one, using theNoopStream
.Based on examples, I came up with the following approach:
The following works:
So I don't get why I have
ERROR: UndefVarError: stream not defined
if instead of reading from the stream, I just pass it to aFASTQ.Reader
.I also tried as follows:
I'm beginning in Julia, so I'm not really sure I interpret the error messages and source code correctly, but isn't
FASTQ.Reader
supposed to accept aTranscodingStream
?And also, isn't my first error due to
stream
not being defined in the above code wheninput isa TranscodingStream
is true ?Your Environment