Hello,
I am trying to do something similar to this old thread (https://www.biostars.org/p/72433/), were I want to determine both the read length and how many reads are in my fastq file. Here is my code:
gunzip -c SRR1060507_1.fastq.gz|awk 'NR%4==2{printlength($0)}'|uniq -c
But I keep getting the following error:
awk: cmd. line:1: (FILENAME=- FNR=2) fatal: function `printlength' not defined
I'm not sure what I've done incorrectly? I also tried Frederic's code from the old thread and although I got that code to run, its not exactly the output I'm seeking, I should be returning something like 2420797 100
Any help would be super appreciated!
-for length
-for num. of sequences