def plot_2d_start_from(slope = nil, y_intercept = nil, hits = @hits)
      pairs = hits.map do |hit|
        Pair.new(hit.hsp_list.map(&:match_query_from).min,
                 hit.hsp_list.map(&:match_query_to).max)
      end

      data = hits.map do |hit|
        { 'x' => hit.hsp_list.map(&:match_query_from).min,
          'y' => hit.hsp_list.map(&:match_query_to).max,
          'color' => 'red' }
      end

      Plot.new(data,
               :scatter,
               'Gene Merge Validation: Start/end of matching hit coord. on' \
               ' query (1 point/hit)',
               '',
               'Start Offset (most left hsp)',
               'End Offset (most right hsp)',
               y_intercept.to_s,
               slope.to_s)
    end
def plot_2d_start_from(slope = nil, y_intercept = nil, hits = @hits)
      pairs = hits.map do |hit|
        Pair.new(hit.hsp_list.map(&:match_query_from).min,
                 hit.hsp_list.map(&:match_query_to).max)
      end

      data = hits.map do |hit|
        { 'x' => hit.hsp_list.map(&:match_query_from).min,
          'y' => hit.hsp_list.map(&:match_query_to).max,
          'color' => 'red' }
      end

      Plot.new(data,
               :scatter,
               'Gene Merge Validation: Start/end of matching hit coord. on' \
               ' query (1 point/hit)',
               '',
               'Start Offset (most left hsp)',
               'End Offset (most right hsp)',
               y_intercept.to_s,
               slope.to_s)
    end
Generates a json file containing data used for
 plotting the start/end of the matched region offsets in the prediction
 Param
 +slope+: slope of the linear regression line
 +y_intercept+: the ecuation of the line is y= slope*x + y_intercept
 +output+: location where the plot will be saved in jped file format
 +hits+: array of Sequence objects