lh3/bioawk — pull request #1 by arq5x (2012-01-06 18:04:55+00:00)
Title: Added gc() and meanqual().

Hi Heng, I added two more convenience functions and associated examples.

Get the %GC from FASTA:

awk -c fastx '{print ">"$name;print gc($seq)}' seq.fa.gz
0.50

Get the mean Phred quality score from FASTQ:

awk -c fastx '{print ">"$name;print meanqual($qual)}' seq.fq.gz
42