Skip to content

Instantly share code, notes, and snippets.

@berguner
Last active March 16, 2023 14:03
Show Gist options
  • Save berguner/66407ecc4097586aea1fa1aafae1865f to your computer and use it in GitHub Desktop.
Save berguner/66407ecc4097586aea1fa1aafae1865f to your computer and use it in GitHub Desktop.
Take a pair of fastq.gz files and produce interleaved fastq output
#!/bin/bash
# This script can be usd to interleave paired fastq.gz files to produce interleaved fastq stdoutput.
# This is quite useful if you don't want to create temporary fastq files (i.e. trimmed.fastq.gz) to run aligners
# Use bash not sh
READ1=$1
READ2=$2
paste <(zcat $READ1 | paste - - - - ) <(zcat $READ2 | paste - - - - ) | tr '\t' '\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment