def plot_orfs(orfs, translated_length)
      raise QueryError unless orfs.is_a? Hash

      data = []

      # Create hashes for the Background
      (-3..3).each do |frame|
        next if frame == 0
        data << { 'y' => frame, 'start' => 1, 'stop' => translated_length,
                  'color' => 'gray' }
      end

      # Create the hashes for the ORFs...
      orfs.each do |_key, h|
        data << { 'y' => h[:frame], 'start' => h[:orf_start],
                  'stop' => h[:orf_end], 'color' => 'red' }
      end

      Plot.new(data,
               :lines,
               'Open Reading Frames in all 6 Frames',
               'Open Reading Frame (Minimimum Length: 30 amino acids),red',
               'Offset in the Prediction',
               'Reading Frame',
               14)
    end
def plot_orfs(orfs, translated_length)
      raise QueryError unless orfs.is_a? Hash

      data = []

      # Create hashes for the Background
      (-3..3).each do |frame|
        next if frame == 0
        data << { 'y' => frame, 'start' => 1, 'stop' => translated_length,
                  'color' => 'gray' }
      end

      # Create the hashes for the ORFs...
      orfs.each do |_key, h|
        data << { 'y' => h[:frame], 'start' => h[:orf_start],
                  'stop' => h[:orf_end], 'color' => 'red' }
      end

      Plot.new(data,
               :lines,
               'Open Reading Frames in all 6 Frames',
               'Open Reading Frame (Minimimum Length: 30 amino acids),red',
               'Offset in the Prediction',
               'Reading Frame',
               14)
    end
Plots the resions corresponding to open reading frames
 Param
 +orfs+: +Hash+ containing the open reading frame
 +output+: location where the plot will be saved in jped file format
 +prediction+: Sequence objects