iCLIP.random.count_ratio

iCLIP.random.count_ratio(x, test, control)

Calculate the ratio of the sum to two columns of a DataFrame.

Parameters:
  • x (pandas.DataFrame) – DataFrame containing the columns to be used
  • test (str) – Name of column to be used as the numerator in the ratio
  • control (str) – Name of column to be used as the demoninator in the ratio
Returns:

Ratio of the sum of counts in column test divided by sum of counts in column control`. If the sum of the control column is 0, returns numpy.Inf

Return type:

float