iCLIP.random.ratio_and_ci¶
-
iCLIP.random.ratio_and_ci(test, control, quantiles=(0.025, 0.975), bootstraps=1000)¶ Calculating ratio between the sum of two columns and add a confidence interval calculated using bootstrapping.
Parameters: - test (sequence or pandas.Series) – set of numbers to use in calculating the numerator of the ratio.
- control (sequence or pandas.Series) – set of numbers to use in calculating the domoninator of the ratio.
- quantiles (tuple of (float, float)) – quantiles to use in calculating confidence interval. For example, for a 95% confidence interval, supply (0.025, 0.975).
- bootstraps (int, optional) – Number of bootstrap samples to draw.
Returns: Series with three entries - ratio, and two quantiles, formed by appending q to the request quantiles: e.g. for default quantiles the index will be [“ratio”, “q0.05”, “q0.95”]
Return type: pandas.Series
See also
Notes
Ideally, the test and control will be of the same length. When bootstraps are drawn, they are drawn in pairs, one from test, one from control. If test and control are similarly index series (e.g. counts from the same transcripts or exons) then this pairing is maintained. This hopefully helps to counteract some of the effects of correlation between the data sets.