Skip to content

Instantly share code, notes, and snippets.

@sminot
Created August 22, 2018 20:23
Show Gist options
  • Select an option

  • Save sminot/ec2b6df36b2cfbd3e0e7856368842c54 to your computer and use it in GitHub Desktop.

Select an option

Save sminot/ec2b6df36b2cfbd3e0e7856368842c54 to your computer and use it in GitHub Desktop.
Merge paired-end FASTQ reads with PANDAseq
#!/bin/bash
set -e
module load PANDAseq/2.11-foss-2016b
find . -name "*_1.fq.gz" | sort -R | while read fwd; do
rev="${fwd/_1.fq.gz/_2.fq.gz}"
[[ -s "$rev" ]]
sample_name="${fwd##*/}"
sample_name="${sample_name%_1.fq.gz}"
output="merged/$sample_name.fastq"
pandaseq -F -w "$output" -f "$fwd" -r "$rev"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment