<p>Hi all,</p>

<p>Any script available for doing sequence length disrtibution of fastq file?</p>

<p>Thanks,
Deepthi</p>

Another awk solution, very similar to Frédéric's:

    cat reads.fastq | awk '{if(NR%4==2) print length($1)}' | sort -n | uniq -c > read_length.txt

And to quickly obtain a graph in R:

    reads<-read.csv(file="read_length.txt", sep="", header=FALSE)
    plot (reads$V2,reads$V1,type="l",xlab="read length",ylab="occurences",col="blue")
