def header(data, fasta_mapper = nil)
      CSV.generate do |csv|
        first = data.first
        keys = fasta_mapper ? ['fasta_header'] : []
        csv << (keys + first.keys).map(&:to_s) if first
      end
    end
def header(data, fasta_mapper = nil)
      CSV.generate do |csv|
        first = data.first
        keys = fasta_mapper ? ['fasta_header'] : []
        csv << (keys + first.keys).map(&:to_s) if first
      end
    end
Returns the header row for the given data and fasta_mapper. This row
 contains all the keys of the first element of the data, preceded by
 'fasta_header' if a fasta_mapper is given.

 @param [Array] data The data that we will use to extract the keys from.

 @param [Array<Array<String>>] fasta_mapper Optional mapping between input
 data and corresponding fasta header. The data is represented as a list
 containing tuples where the first element is the fasta header and second
 element is the input data If a fasta_mapper is given, the output will be
 preceded with 'fasta_header'.

 @return [String] The header row