Computing Synergy References#
- xynergy.reference.add_reference(df, dose_cols, response_col, experiment_cols=None, method: list[str] | str = ['bliss', 'hsa', 'loewe', 'zip'], log: str = 'all')#
Add columns containing the reference for a given method.
Parameters#
- df: polars.DataFrame
Usually the output from
tidyor one of its downstream functions- dose_cols: list, default [“dose_a”, “dose_b”]
A list of exactly two columns names that contain untransformed numeric values of agent dose
- response_col: string, default “response”
The name of the column containing responses
- experiment_cols: list[str], string, or None, default “experiment_id”
The names of columns that should be used to distinguish one dose pair’s response from another. If none are supplied, two rows with the same doses will be considered replicates.
- method: list[str] or str, default [“bliss”, “hsa”, “loewe”, “zip”]
The method used for calculating reference.
- log: string, default “all”
Verbosity of function. Options include “all”, “warn”, and “none”.
If “all”, will emit notes and warnings.
If “warn”, will emit only warnings.
If “none”, will not emit anything (except errors)
Returns#
- polars.DataFrame
Input with
[method]_refcolumns appended.
Warnings#
Subtracting the reference from the observed value is sometimes, but not always the same as calculating the synergy score. If what you want is a measure of deviation of the observed response from the expected response, prefer
add_synergyNotes#
Refer to
add_synergyfor details on individual synergy/reference models, such as their advantages, limitations, and how they are calculated