Created
August 22, 2018 20:23
-
-
Save sminot/ec2b6df36b2cfbd3e0e7856368842c54 to your computer and use it in GitHub Desktop.
Merge paired-end FASTQ reads with PANDAseq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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