Created
May 28, 2019 12:50
-
-
Save apeltzer/0914f66c69203992a29763bb219e98da to your computer and use it in GitHub Desktop.
MergeLanes
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
#Based on Stephen Turners and Wei Shen's ideas | |
# Works fine if your ID in the beginning is sort of (hehe) unique. | |
# Comment out the cat part to run the dry run and check whether your output makes sense. | |
ls *R1* | cut -d _ -f 1 | sort | uniq \ | |
| while read id; do \ | |
echo "$id*R1*.fastq.gz >> $id.R1.fastq.gz"; | |
cat $id*R1*.fastq.gz >> $id.R1.fastq.gz; | |
echo "$id*R2*.fastq.gz >> $id.R2.fastq.gz"; | |
cat $id*R2*.fastq.gz >> $id.R2.fastq.gz; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment