DIP calculations and statistics (thunor.dip
)¶
-
thunor.dip.
adjusted_r_squared
(r, n, p)¶ Calculate adjusted r-squared value from r value
- Parameters
r (float) – r value (between 0 and 1)
n (int) – number of sample data points
p (int) – number of free parameters used in fit
- Returns
Adjusted r-squared value
- Return type
float
-
thunor.dip.
ctrl_dip_rates
(df_controls)¶ Calculate control DIP rates
- Parameters
df_controls (pd.DataFrame) – Pandas DataFrame of control cell counts from a
thunor.io.HtsPandas
object- Returns
Fitted control DIP rate values
- Return type
pd.DataFrame
-
thunor.dip.
dip_rates
(df_data, selector_fn=<function tyson1>)¶ Calculate DIP rates on a dataset
- Parameters
df_data (thunor.io.HtsPandas) – Thunor HTS dataset
selector_fn (function) – Selection function for choosing optimal DIP rate fit (default:
tyson1()
- Returns
Two entry list, giving control DIP rates and experiment (non-control) DIP rates (both as Pandas DataFrames)
- Return type
list
-
thunor.dip.
expt_dip_rates
(df_doses, df_vals, selector_fn=<function tyson1>)¶ Calculate experiment (non-control) DIP rates
- Parameters
df_doses (pd.DataFrame) – Pandas DataFrame of dose values from a
thunor.io.HtsPandas
objectdf_vals (pd.DataFrame) – Pandas DataFrame of cell counts from a
thunor.io.HtsPandas
objectselector_fn (function) – Selection function for choosing optimal DIP rate fit (default:
tyson1()
- Returns
Fitted DIP rate values
- Return type
pd.DataFrame
-
thunor.dip.
tyson1
(adj_r_sq, rmse, n)¶ Tyson1 algorithm for selecting optimal DIP rate fit
- Parameters
adj_r_sq (float) – Adjusted r-squared value
rmse (float) – Root mean squared error of fit
n (int) – Number of data points used in fit
- Returns
Fit value (higher is better)
- Return type
float