Skip to content

Instantly share code, notes, and snippets.

@allenday
Last active February 4, 2017 08:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save allenday/7c1818c9854b968c01d6ccf81dcdd14f to your computer and use it in GitHub Desktop.
Save allenday/7c1818c9854b968c01d6ccf81dcdd14f to your computer and use it in GitHub Desktop.
for B in `ls -1 *fastq* | perl -ne 'm#^(.+?)_#;print "$1\n"' | sort | uniq`; do
echo $B;
java -jar ~/bin/picard.jar FastqToSam F1=$(ls -1 ${B}_*R1*.fastq.gz) F2=$(ls -1 ${B}_*R2*fastq.gz) O=$B.bam SAMPLE_NAME=$B;
#in case of a failure, we'll get a file of zero bytes
touch $B.bam
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment