-
-
Save alienzj/4687f175ffeebdb4c2e788f227c50d12 to your computer and use it in GitHub Desktop.
compute reads length distribution from a fastq file
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
#!/bin/sh | |
# compute reads length distribution from a fastq file | |
awk 'NR%4 == 2 {lengths[length($0)]++} END {for (l in lengths) {print l, lengths[l]}}' file.fastq |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment