def plot_matched_regions(hits = @hits)
      no_lines = hits.length

      hits_less = hits[0..[no_lines, hits.length - 1].min]

      data = hits_less.each_with_index.map do |hit, i|
        { 'y' => i,
          'start' => hit.hsp_list.map(&:match_query_from).min,
          'stop' => hit.hsp_list.map(&:match_query_to).max,
          'color' => 'black',
          'dotted' => 'true' }
      end .flatten +
             hits_less.each_with_index.map do |hit, i|
               hit.hsp_list.map do |hsp|
                 { 'y' => i,
                   'start' => hsp.match_query_from,
                   'stop' => hsp.match_query_to,
                   'color' => 'orange' }
               end
             end .flatten

      Plot.new(data,
               :lines,
               'Gene Merge Validation: Query coord covered by blast hit' \
               ' (1 line/hit)',
               '',
               'Offset in Prediction',
               'Hit Number',
               hits_less.length)
    end
def plot_matched_regions(hits = @hits)
      no_lines = hits.length

      hits_less = hits[0..[no_lines, hits.length - 1].min]

      data = hits_less.each_with_index.map do |hit, i|
        { 'y' => i,
          'start' => hit.hsp_list.map(&:match_query_from).min,
          'stop' => hit.hsp_list.map(&:match_query_to).max,
          'color' => 'black',
          'dotted' => 'true' }
      end .flatten +
             hits_less.each_with_index.map do |hit, i|
               hit.hsp_list.map do |hsp|
                 { 'y' => i,
                   'start' => hsp.match_query_from,
                   'stop' => hsp.match_query_to,
                   'color' => 'orange' }
               end
             end .flatten

      Plot.new(data,
               :lines,
               'Gene Merge Validation: Query coord covered by blast hit' \
               ' (1 line/hit)',
               '',
               'Offset in Prediction',
               'Hit Number',
               hits_less.length)
    end
Generates a json file containing data used for
 plotting the matched region of the prediction for each hit
 Param
 +output+: location where the plot will be saved in jped file format
 +hits+: array of Sequence objects
 +prediction+: Sequence objects