Created
September 29, 2018 23:13
-
-
Save cyklee/f6fdbf8d60ed92159d61f9151efa5a74 to your computer and use it in GitHub Desktop.
Count number of nucleotides in all the FASTQ files in the directory
This file contains 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
# If, for some crazy reason, you want to know how many individual bases you have in your dataset. | |
for i in *.fastq; do | |
cat $i | paste - - - - | cut -f 2 | tr -d '\n' | wc -c >> char.txt | |
done | |
R -e 'sum(read.csv("char.txt"))' | |
# You can replace *.fastq with *.fastq.gz and cat with zcat if your data is compressed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment