docs: def calculate_s0_curve(s0, minpval, maxpval, minratio, maxratio, curve_interval=0.1):
      """
      Calculate s0 curve for volcano plot.
  
      Taking an min and max p value, and a min and max ratio, calculate an smooth
      curve starting from parameter `s0` in each direction.
  
      The `curve_interval` parameter defines the smoothness of the resulting curve.
  
      :param s0: `float` offset of curve from interset
      :param minpval: `float` minimum p value
      :param maxpval: `float` maximum p value
      :param minratio: `float` minimum ratio
      :param maxratio: `float` maximum ratio
      :param curve_interval: `float` stepsize (smoothness) of curve generator
      :return: x, y, fn  x,y points of curve, and fn generator
      """
  
      mminpval = -np.log10(minpval)
      mmaxpval = -np.log10(maxpval)
      maxpval_adjust = mmaxpval - mminpval
  
      ax0 = (s0 + maxpval_adjust * minratio) / maxpval_adjust
      edge_offset = (maxratio-ax0) % curve_interval
      max_x = maxratio-edge_offset
  
  
      if (max_x > ax0):
          x = np.arange(ax0, max_x, curve_interval)
      else:
          x = np.arange(max_x, ax0, curve_interval)
  
      fn = lambda x: 10 ** (-s0/(x-minratio) - mminpval)
      y = fn(x)
  
      return x, y, fn