def write_input_sequence_to_file(tmp_dir, hash, sequence)
      seq = File.join(tmp_dir, hash + ".seq")
      File.open(seq, "w") do |f|
        f << sequence
      end

      fasta = File.join(tmp_dir, hash + ".fa")

      # Force FASTA format.
      cmd = "seqret -filter -sformat pearson -osformat fasta < #{seq} " <<
      "> #{fasta} 2> /dev/null"
      system(cmd)
      if $?.exitstatus > 0
        raise " - Please enter your sequence(s) in Plain Text as " <<
          "FASTA."
      end
    end
def write_input_sequence_to_file(tmp_dir, hash, sequence)
      seq = File.join(tmp_dir, hash + ".seq")
      File.open(seq, "w") do |f|
        f << sequence
      end

      fasta = File.join(tmp_dir, hash + ".fa")

      # Force FASTA format.
      cmd = "seqret -filter -sformat pearson -osformat fasta < #{seq} " <<
      "> #{fasta} 2> /dev/null"
      system(cmd)
      if $?.exitstatus > 0
        raise " - Please enter your sequence(s) in Plain Text as " <<
          "FASTA."
      end
    end
Write input sequence to file. Pass the raw input data through seqret
 to ensure FASTA format.