Parses and writes fasta files using templates