Skip to content

Instantly share code, notes, and snippets.

@cyklee
Last active March 11, 2019 21:24
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 cyklee/709a6045729faea926e0af82284c1827 to your computer and use it in GitHub Desktop.
Save cyklee/709a6045729faea926e0af82284c1827 to your computer and use it in GitHub Desktop.
Count the total number of reads in a collection of fastq files
for i in *.fastq; do
echo $(cat $i| wc -l)/4 | bc >> count.txt # can use zcat for gzipped files
done
calc `paste -sd+ count.txt`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment