title: Error in do.ply(i) : task 1 failed - "record does not start with '@'"
body: <p>I want to use doMC package of R to read the fastq file, but I meet this problem.</p>
  <blockquote>
  <p>Error in do.ply(i) : task 1 failed - &quot;record does not start with '@'&quot;</p>
  <p>Error in do.ply(i) : task 1 failed - &quot;internal: buf != &quot;</p>
  </blockquote>
  <p>My code is</p>
  <pre><code>library(ShortRead)
  library(foreach)
  library(doMC)
  library(plyr)
  fastq_file &lt;- '../quantibio/data/SRR038848.fastq'
  n_cores &lt;- 2
  registerDoMC(n_cores)
  parallel &lt;- T
  if(n_cores==1) parallel &lt;- F
  n_lines &lt;- countLines(fastq_file)
  n_reads &lt;- n_lines/4
  threshold=1e5
  n_chuncks &lt;- ceiling(n_reads/threshold)
  fq &lt;- FastqStreamer(fastq_file, threshold)
  chunck_out &lt;- llply(1:n_chuncks, function(ii){
    f &lt;- yield(fq)
    width_max &lt;&lt;- max(width(f))
    # chunck_list &lt;-  .proc_chunk(f, width_max)
    f
    
  }, .parallel=parallel,
  .paropts = list(.export = c('fq'), .packages=c('ShortRead', 'Biostrings') ))
  close(fq)
  </code></pre>