Skip to content

Instantly share code, notes, and snippets.

@wdecoster
Created October 21, 2017 12:05
Show Gist options
  • Select an option

  • Save wdecoster/ee355bda19e384e3f8a4bb68bd877a07 to your computer and use it in GitHub Desktop.

Select an option

Save wdecoster/ee355bda19e384e3f8a4bb68bd877a07 to your computer and use it in GitHub Desktop.
def stream_fastq_full(fastq, threads):
'''
Extract from a fastq file:
-readname
-average and median quality
-read_lenght
'''
with cfutures.ThreadPoolExecutor(max_workers=threads) as executor:
for results in executor.map(extract_all_from_fastq, SeqIO.parse(fastq, "fastq")):
yield results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment