lh3/bioawk — pull request #12 by vsbuffalo (2013-05-11 08:03:39+00:00)
Title: added fastx function, which is like sprintf for FASTA & FASTQ

This commit adds the function `fastx`, which behaves like `sprintf` for FASTA/FASTQ output. It simplifies FASTA/FASTQ output, as `fastx($name, $seq)` outputs a FASTA file and `fastx($name, $seq, $qual)` outputs a FASTQ file. I chose to make a function like `sprintf` because overloading a print-like function would require changing much more of the basic awk code (to deal with redirection, etc).