Package 'synergyfinder'

Title: Calculate and Visualize Synergy Scores for Drug Combinations
Description: Efficient implementations for analyzing pre-clinical multiple drug combination datasets. It provides efficient implementations for 1.the popular synergy scoring models, including HSA, Loewe, Bliss, and ZIP to quantify the degree of drug combination synergy; 2. higher order drug combination data analysis and synergy landscape visualization for unlimited number of drugs in a combination; 3. statistical analysis of drug combination synergy and sensitivity with confidence intervals and p-values; 4. synergy barometer for harmonizing multiple synergy scoring methods to provide a consensus metric of synergy; 5. evaluation of synergy and sensitivity simultaneously to provide an unbiased interpretation of the clinical potential of the drug combinations. Based on this package, we also provide a web application (http://www.synergyfinder.org) for users who prefer graphical user interface.
Authors: Shuyu Zheng [aut, cre], Jing Tang [aut]
Maintainer: Shuyu Zheng <[email protected]>
License: Mozilla Public License 2.0
Version: 3.13.0
Built: 2024-07-01 04:49:21 UTC
Source: https://github.com/bioc/synergyfinder

Help Index


Adjust Column Names of Input Data Table

Description

This function changes the column names in other format into the style: block_id, drug1, drug2, conc1, conc2, response, conc_unit1, conc_unit2.

Usage

.AdjustColumnName(data)

Arguments

data

A data frame. It is the input data for function ReshapeData

Value

The data frame with the changed column names.

Author(s)


Bootstraping Sample from Replicates in Response Data

Description

Bootstraping Sample from Replicates in Response Data

Usage

.Bootstrapping(response)

Arguments

response

A data frame. It contains the dose response information about one drug combination block with replicates. It must contain the columns "conc1", "conc2", ... for concentrations of drugs tested and the "response" column for observed % inhibition if cell growth.

Value

A data frame. It contains a full drug combination matrix whose data points are randomly selected from replicates.

Author(s)


Calculate Distance from a Point to a Plane

Description

This function is used to calculate the distance from a point to a plane. It could also be used in high dimension spaces. The formula comes from https://en.wikipedia.org/wiki/Distance_from_a_point_to_a_plane For two dimension point, the distance to the line w1\*x+w2\*y+b = 0 For three dimension point, the distance to the plan w1\*x+w2\*y+w3\*z+b = 0

Usage

.Distance(w, b, point)

Arguments

w

A numeric vector. It contains the parameters for all the coordinates in the spaces to define the "plan".

b

A numeric value. It is the constant values in the formula which defines the "plane".

point

A numeric vector. It contains the coordinates in the spaces to define the "point".

Value

A numeric value. It is the distance from point defined by x0 to the "plane" defined by w and b

Author(s)


Make a Smooth Surface for Scores

Description

Make a Smooth Surface for Scores

Usage

.ExtendedScores(scores_mat, len)

Arguments

scores_mat

a matrix contains scores which will be visualized

len

length of the interval between plotted data points.

Value

a matrix which which contains interpolated points for input scores_mat.

Author(s)


Extract Data for 2 Drug Combination Plots

Description

Extract Data for 2 Drug Combination Plots

Usage

.Extract2DrugPlotData(
  data,
  plot_block = 1,
  drugs = c(1, 2),
  plot_value = "response",
  statistic = NULL
)

Arguments

data

A list object generated by function ReshapeData.

plot_block

A character/integer. It indicates the block ID for the block to visualize.

drugs

A vector of characters or integers with length of 2. It contains the index for two drugs to plot. For example, c(1, 2) indicates to plot "drug1" and "drug2" in the input data.

plot_value

A character value. It indicates the value to be visualized. If the data is the direct output from ReshapeData, the values for this parameter are:

  • response_origin The original response value in input data. It might be % inhibition or % viability.

  • response The % inhibition after preprocess by function ReshapeData

If the data is the output from CalculateSynergy, following values are also available:

  • ZIP_ref, Bliss_ref, HSA_ref, Loewe_ref The reference additive effects calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_synergy, Bliss_synergy, HSA_synergy, Loewe_synergy The synergy score calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_fit The response fitted by ZIP model.

statistic

A character or NULL. It indicates the statistics printed in the plot while there are replicates in input data. Available values are:

  • sem Standard error of mean;

  • ci 95% confidence interval.

If it is NULL, no statistics will be printed.

Value

A data frame. It contains the concentrations for selected drugs, the selected values for plotting, and the text for printing on the heatmap.

Author(s)


Extract Data Table and Annotation Information for Multi-drug Plotting

Description

This function extracts the information for Multi-drug plotting from input list data. It is an auxiliary function for PlotMultiDrugSurface and PlotMultiDrugBar.

Usage

.ExtractMultiDrugPlotData(
  data,
  plot_block = 1,
  plot_value = "response",
  summary_statistic = NULL,
  statistic = NULL,
  titles = TRUE
)

Arguments

data

A list object generated by function ReshapeData.

plot_block

A character/integer. It indicates the block ID for the block to visualize.

plot_value

A vector of characters. It contains the name of one or more metrics to be visualized. If the data is the direct output from ReshapeData, the values for this parameter are:

  • response_origin The original response value in input data. It might be % inhibition or % viability.

  • response The % inhibition after preprocess by function ReshapeData

If the data is the output from CalculateSynergy, following values are also available:

  • ZIP_ref, Bliss_ref, HSA_ref, Loewe_ref The reference additive effects calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_synergy, Bliss_synergy, HSA_synergy, Loewe_synergy The synergy score calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_fit The response fitted by ZIP model.

summary_statistic

A vector of characters or NULL. It indicates the summary statistics for all the plot_value in whole combination matrix. Available values are:

  • mean Median value for all the responses or synergy scores in the matrix and the p-value if it is valid;

  • median Median value for all the responses or synergy scores in the matrix;

  • quantile_90 90% quantile. User could change the number to print different sample quantile. For example quantile_50 equal to median.

If it is NULL, no statistics will be printed.

statistic

A character or NULL. It indicates the statistics printed in the plot while there are replicates in input data. Available values are:

  • sem Standard error of mean;

  • ci 95

If it is NULL, no statistics will be printed.

titles

A logical value. If it is TRUE, the plot tile, subtilte, and title for z axis will be extracted and output.

Value

A list. It contains the elements:

  • plot_table A data frame contains concentrations for all drugs, the values for plot_value.

  • drug_pair A data frame contains the drug names and concentration unites, whither the block is replicate or not.

  • plot_subtitle A string for plot subtitle.

  • plot_title A string for plot title.

  • z_axis_subtitle A string for plot z-axis title.

Author(s)


CSS Facilitate Function - Log Calculation (nature based) LL.4 Model

Description

#' This function calculates ln(1+10^(b*(c-x))) to be used in .ScoreCurve function

Usage

.Own_log(b, c, x)

Arguments

b

A numeric value. It is the fitted parameter b from L.4 model.

c

A numeric value. It is the fitted parameter c from L.4 model.

x

A numeric value. It is the relative IC50 for the curve. log10(e), where e is the fitted parameter e from L.4 model.

Value

ln(1+10^(b*(c-x)))

Author(s)


CSS Facilitate Function - Log (nature based) Calculation L.4 Model

Description

This function calculates ln(1+exp(x)) to be used in .ScoreCurve_L4 function

Usage

.Own_log2(x)

Arguments

x

A numeric value. It is relative IC50 for the curve. The fitted parameter e from L.4 model.

Value

A numeric value. It is ln(1+exp(x))

Author(s)


Predict Response Value at Certain Drug Dose

Description

PredictResponseFromModel uses drm function to fit the dose response model and generate the predict response value at the given dose.

Usage

.PredictResponseFromModel(model, dose)

Arguments

model

An object for fitted model from drm::drc function L.4 or LL.4 model.

dose

A numeric value. It indicates the concentration of drug at which the response will be predicted.

Details

Note: Random number generator used in AddNoise with method = "random". If the analysis requires reproducibility, please set the random seed before calling this function.

Value

A numeric value. It is the response value of cell line to the drug at inputted dose.

Author(s)


Convert Font Size from pt to mm

Description

This function converts font sizes from "pt" unite to "mm" unite.

Usage

.Pt2mm(x)

Arguments

x

A numerical value. It is the font size in "pt" unite.

Value

A numerical value in "mm" unite

Author(s)


Round the Numbers for Plotting

Description

This function will round the input numbers by 2 digits, if the absolute of number is larger than or equal to 1. It will take 2 significant digits, if the absolute of number is less than 1.

Usage

.RoundValues(numbers)

Arguments

numbers

A vector of numeric values. It contains the numbers need to be rounded.

Value

A vector of rounded numbers.

Author(s)


CSS Facilitate Function - .ScoreCurve for Curves Fitted by LL.4 Model

Description

New function used to score sensitivities given either a single-agent or a fixed conc (combination) columns. The function calculates the AUC of the log10-scaled dose-response curve. IMPORTANT: note that with LL.4 calls, this value is already logged since the input concentrations are logged.

Usage

.ScoreCurve(b, c, d, m, c1, c2, t)

Arguments

b

A numeric value, fitted parameter b from LL.4 model.

c

A numeric value, fitted parameter c from LL.4 model.

d

A numeric value, fitted parameter d from LL.4 model.

m

A numeric value, relative IC50 for the curve. log10(e), where e is the fitted parameter e from LL.4 model.

c1

A numeric value, log10(min conc) (this is the minimal nonzero concentration).

c2

A numeric value, log10(max conc) (this is the maximal concentration).

t

A numeric value, threshold (usually set to zero).

Value

A numeric value, RI or CSS scores.

Author(s)


CSS Facilitate Function - .ScoreCurve for Curves Fitted by L.4 Model

Description

This function is used to score sensitivities given either a single-agent or a fixed conc (combination) columns. The function calculates the AUC of the log10-scaled dose-response curve.

Usage

.ScoreCurve_L4(b, c, d, e, c1, c2, t)

Arguments

b

A numeric value, fitted parameter b from L.4 model.

c

A numeric value, fitted parameter c from L.4 model.

d

A numeric value, fitted parameter d from L.4 model.

e

A numeric value, fitted parameter e from L.4 model.

c1

A numeric value, log10(min conc) (this is the minimal nonzero concentration).

c2

A numeric value, log10(max conc) (this is the maximal concentration).

t

A numeric value, threshold (usually set to zero).

Value

A numeric value, RI or CSS scores.

Author(s)


Solve the Expected Dose of Drug to Achieve Given Effect from L.4 Model

Description

This function will solve the fitted four-parameter logistic dose-response model and output the dose of drug at which it could achieve the % inhibition to cell growth.

Usage

.SolveExpDoesL4(y, drug_par)

Arguments

y

The expected effect (% inhibition) of the drug to cell line

drug_par

The parameters ("b_Hill", "c_Emin", "d_Emax", "e_log(EC50)") for fitted dose-response model.

Value

A numeric value. It indicates the expected dose of drug.

Author(s)


Solve the Expected Dose of Drug to Achieve Given Effect from LL.4 Model

Description

This function will solve the fitted four-parameter log-logistic dose-response model and output the dose of drug at which it could achieve the % inhibition to cell growth.

Usage

.SolveExpDoesLL4(y, drug_par)

Arguments

y

The expected effect (% inhibition) of the drug to cell line

drug_par

The parameters ("b_Hill", "c_Emin", "d_Emax", "e_EC50") for fitted dose-response model.

Value

A numeric value. It indicates the expected dose of drug.

Author(s)


Solve the Expected Dose of Drug to Achieve Given Effect (% inhibition)

Description

This function will solve the fitted dose-response model and output the dose of drug at which it could achieve the % inhibition to cell growth.

Usage

.SolveExpDose(y, drug_par, drug_type)

Arguments

y

The expected effect (% inhibition) of the drug to cell line.

drug_par

The parameters for fitted dose-response model.

drug_type

The type of model was used to fit the dose-response curve. Available values are "L.4" - four-parameter logistic model; "LL.4" - four-parameter log-logistic model.

Value

A numeric value. It indicates the expected dose of drug.

Author(s)


Solve the Loewe Additive Effect for Concentration Combinations Isobologram

Description

Solve the Loewe Additive Effect for Concentration Combinations Isobologram

Usage

.SolveLoewe(concs, drug_par, drug_type, nsteps = 100)

Arguments

concs

A numeric vector. It contains the concentrations of tested drugs.

drug_par

A numeric vector. The parameters in fitted dose response curve.

drug_type

The type of model used to fit dose response curve.

nsteps

The total steps to calculate concentration combinations approaching to the true Loewe effect.

Value

A list contains 3 items:

  • y_loewe the predicted Loewe additive effect which closes to .

  • x_select the expected concentrations for each drug to achieve y_loewe.

  • distance the smallest distance

Author(s)


Calculate Bliss Synergy Score

Description

Bliss calculates the synergy score matrix for a block of drug combination by using a drug interaction reference model introduced by C. I. Bliss in 1939.

Usage

Bliss(response)

Arguments

response

A data frame. It must contain the columns: "conc1", "conc2", ..., for the concentration of the combined drugs and "response" for the observed %inhibition at certain combination.

Details

This model is a reference model for evaluating the combination effect of two drugs. The basic assumption of this model is "The expected effect of two drugs acting independently". The Bliss reference effect y = 1 - product_all_drug(1-%Inhibition) * 100.

Value

A data frame containing the concentrations for drugs, reference effect and synergy score estimated by Bliss model.

Author(s)

References

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
response <- data$response[data$response$block_id == 1,
                          c("conc1", "conc2", "response")]
Bliss.score <- Bliss(response)

Calculate Combination Sensitivity Score

Description

This function will calculate the Combination Sensitivity Score (CSS) for a drug combination block.

Usage

CalculateCSS(response, ic50)

Arguments

response

A data frame. It must contain the columns: "conc1", "conc2", ..., for the concentration of the combined drugs and "response" for the observed %inhibition at certain combination.

ic50

A list. It contains the relative IC50 for all the drugs in the combination.

Value

A data frame. It contains the CSS for each drug will one of the other drugs is at its IC50 and summarized CSS for the whole block.

Author(s)


Calculate Relative IC50 from Fitted Model

Description

This function will calculate the relative IC50 from fitted 4-parameter log-logistic dose response model.

Usage

CalculateIC50(coef, type, max.conc)

Arguments

coef

A numeric vector. It contains the fitted coefficients for 4-parameter log-logistic dose response model.

type

A character value. It indicates the type of model was used for fitting the dose-response curve. Available values are "L.4" and "LL.4".

max.conc

A numeric value. It indicates the maximum concentration in the dose-response data

Value

A numeric value. It is the relative IC50.

Author(s)


Calculate Relative Inhibition (RI) for Dose-Response Curve

Description

Function CalculateRI calculates cell line sensitivity to a drug or a combination of drugs from dose response curve.

Usage

CalculateRI(df)

Arguments

df

A data frame. It contains two variables:

  • dose the concentrations of drugs.

  • response the response of cell lines at corresponding doses. We use inhibition rate of cell line growth to measure the response.

Details

This function measures the sensitivity by calculating the Area Under Curve (AUC) according to the dose response curve. The lower border is chosen as lowest non-zero concentration in the dose response data.

Value

A numeric value. It is the RI score for input dose-response curve.

Author(s)

Examples

# LL.4
df <- data.frame(dose = c(0, 0.1954, 0.7812, 3.125, 12.5, 50),
                 response = c(2.95, 3.76, 18.13, 28.69, 46.66, 58.82))
RI <- CalculateRI(df)

Calculate the Sensitivity Scores for Drug Combinations

Description

CalculateSensitivity is the main function for calculating sensitivity scores from the dose response matrix. It will return the RI (relative inhibition), IC50 (relative IC50) for each drug in the combination. It will also calculate the CSS (combination sensitivity score) for each drug while other drugs are at their IC50 and the CSS for the whole combination matrix.

Usage

CalculateSensitivity(
  data,
  adjusted = TRUE,
  correct_baseline = "non",
  iteration = 10,
  seed = 123
)

Arguments

data

A list object generated by function ReshapeData.

adjusted

A logical value. If it is TRUE, the 'adjusted.response.mats' will be used to calculate synergy scores. If it is FALSE, the raw data ('dose.response.mats') will be used to calculate synergy scores.

correct_baseline

A character value. It indicates the method used for baseline correction. Available values are:

  • non No baseline correction.

  • part Adjust only the negative values in the matrix.

  • all Adjust all values in the matrix.

iteration

An integer. It indicates the number of iterations for bootstrap on data with replicates.

seed

An integer or NULL. It is used to set the random seed in synergy scores calculation on data with replicates.

Value

This function will add columns into data$drug_pairs table. The columns are:

  • ic50_1/2/... Relative IC50 for drug 1, 2, ...

  • ri_1/2/... Relative Inhibition (RI) for drug 1, 2, ...

  • css1_ic502/... CSS score of drug 1 while fixing drug 2 at its IC50.

  • css Over all CSS score for the whole block. It's the mean value of the CSS for all drug pairs in the combination.

If there are replicates in the block, this function will add one table named as "sensitivity_scores_statistics" for the statistics of the values mentioned about into the input data list.

Author(s)

Examples

data("ONEIL_screening_data")
data <- ReshapeData(ONEIL_screening_data, data_type = "inhibition")
data <- CalculateSensitivity(data)

Calculate the Synergy Scores for Drug Combinations

Description

CalculateSynergy is the main function for calculating synergy scores based on model(ZIP, Bliss, Loewe, and HSA) from one dose-response matrix.

Usage

CalculateSynergy(
  data,
  method = c("ZIP", "HSA", "Bliss", "Loewe"),
  Emin = NA,
  Emax = NA,
  adjusted = TRUE,
  correct_baseline = "non",
  iteration = 10,
  seed = 123
)

Arguments

data

A list object generated by function ReshapeData.

method

A vector of characters. It is used to specify the reference models used to calculate the synergy scores. Choices are "ZIP", "Bliss", "HSA" and "Loewe". Default setting is to calculate all the available models.

Emin

The expected minimum response value in the 4 parameter log-logistic model. It is used while calling ZIP and Loewe.

Emax

The expected maximum response value in the 4 parameter log-logistic model. It is used while calling ZIP and Loewe.

adjusted

A logical value. If it is TRUE, the 'response' column in the table 'data$response' will be used to calculate synergy scores. If it is FALSE, the raw data 'response_origin' column will be used to calculate synergy scores.

correct_baseline

A character value. It indicates the method used for baseline correction. Available values are:

  • non No baseline correction.

  • part Adjust only the negative values in the matrix.

  • all Adjust all values in the matrix.

iteration

An integer value. It indicates the number of iterations for bootstrap on data with replicates.

seed

An integer or NULL. It is used to set the random seed in synergy scores calculation on data with replicates.

Value

This function will add 1 or 2 elements into inputted data list:

  • scores A data frame. It contains synergy scores, reference effects and fitted response values (only for "ZIP" model) calculated by selected method. If there are replicates in the block, the mean values across all iterations for all the metrics mentioned above will be output.

  • scores_statistics A data frame. It will be output if there is block have replicated response values. It contains the the statistics (including mean, standard deviation, standard error of mean and 95 and fitted response values (only for "ZIP" model) across results from iterations.

This function also add mean of synergy scores across whole combination matrix to the data$drug_pair table.

Author(s)

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
scores <- CalculateSynergy(data)

Base Line Correction for Drug Combination Matrix

Description

CorrectBaseLine adjusts the base line of drug combination dose-response matrix to make it closer to 0.

Usage

CorrectBaseLine(response, method = c("non", "part", "all"))

Arguments

response

A drug combination dose-response matrix. It's column name and row name are representing the concentrations of drug added to column and row, respectively. The values in matrix indicate the inhibition rate to cell growth.

method

A character value. It indicates the method used for baseline correction. Available values are:

  • non No baseline correction.

  • part Adjust only the negative values in the matrix.

  • all Adjust all values in the matrix.

Value

A matrix which base line have been adjusted.

Author(s)

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
response <- data$response[data$response$block_id == 1, ]
adjusted <- CorrectBaseLine(response, method = "part")

Dimension Reduction for Multi-drug Combination Visualization

Description

This function will take the multi-drug combination data, project the concentrations of all the drugs into 2 dimensions. It is an auxiliary function for PlotMultiDrugSurface

Usage

DimensionReduction(
  plot_table,
  drug_pair,
  plot_value,
  distance_method = "mahalanobis"
)

Arguments

plot_table

A data frame contains concentrations for all drugs, the values for plot_value.

drug_pair

A data frame contains the drug names and concentration unites, whither the block is replicate or not.

plot_value

A vector of characters. It contains the name of one or more metrics to be visualized. If the data is the direct output from ReshapeData, the values for this parameter are:

  • response_origin The original response value in input data. It might be % inhibition or % viability.

  • response The % inhibition after preprocess by function ReshapeData

If the data is the output from CalculateSynergy, following values are also available:

  • ZIP_ref, Bliss_ref, HSA_ref, Loewe_ref The reference additive effects calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_synergy, Bliss_synergy, HSA_synergy, Loewe_synergy The synergy score calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_fit The response fitted by ZIP model.

distance_method

The methods to calculate the distance between different data points from the concentration of drugs. The distance matrix is used for dimension reduction. This parameter is used to set the parameter method for vegdist. The default values is "mahalanobis".

Value

A data frame. It contains the plot information required by function GenerateSurface

Author(s)


Extract Single Drug Dose Response

Description

ExtractSingleDrug extracts the dose-response values of single drug from a drug combination dose-response matrix.

Usage

ExtractSingleDrug(response)

Arguments

response

A data frame. It must contain the columns: "conc1", "conc2", ..., for the concentration of the combined drugs and "response" for the observed %inhibition at certain combination.

Value

A list contains several data frames each of which contains 2 columns:

  • dose The concertration of drug.

  • response The cell's response (inhibation rate) to corresponding drug concertration.

Author(s)

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
response <- data$response[data$response$block_id == 1,
                          c("conc1", "conc2", "response")]
single <- ExtractSingleDrug(response)

Find the Fitted Parameters from 4-Parameter Log-Logistic Model

Description

Find the Fitted Parameters from 4-Parameter Log-Logistic Model

Usage

FindModelPar(model)

Arguments

model

A object of class "drc".

Value

A numeric vector. It contains 4 fitted parameters.


Find the Type of Model Used for Fitting Dose Response Data

Description

FindModelType will extract the model type ("LL.4" or "L.4) eventually used in funciton FitDoseResponse

Usage

FindModelType(model)

Arguments

model

An object of class 'drc'. It is generated by function FitDoseResponse

Value

A character either "LL.4" or "L.4". It indicates the type of model used for fitting dose response data.

Author(s)

Examples

df <- data.frame(
  response = c(0, 29, 59, 60, 75, 90),
  dose = c(0.00, 9.7656, 39.0626, 156.25, 625, 2500)
)
model <- FitDoseResponse(df)
model.type <- FindModelType(model)

Fitting Single Drug Dose-Response Model

Description

Function FitDoseResponse fits dose-response model by using drm function.

Usage

FitDoseResponse(data, Emin = NA, Emax = NA)

Arguments

data

A data frame. It contains two columns:

  • dose The concentration of drugs added in experiment.

  • response The response ( with different concentrations.

Emin

A numeric value or NA. the minimal effect of the drug used in the 4-parameter log-logistic function to fit the dose-response curve. If it is not NA, it is fixed the value assigned by the user. Default setting is NA.

Emax

A numeric or NA. the maximal effect of the drug used in the 4-parameter log-logistic function to fit the dose-response curve. If it is not NA, it is fixed the value assigned by the user. Default setting is NA.

Details

Pre-fitting process: 1. Change the 0 value in concentration into 10^-10 to avoide raising error when taking log. 2. If the variance of "response" values equal to 0, add 10^-10 to the last "response" value.

Model choice: First use "L.4" model to fit the raw data. If error or waring occurs, use "LL.4" model to fit log(raw data).

Value

An object of class 'drc'. It contains information of fitted model.

Author(s)

References

Seber, G. A. F. and Wild, C. J (1989) hrefhttps://onlinelibrary.wiley.com/doi/book/10.1002/0471725315Nonlinear Regression, New York: Wiley \& Sons (p. 330).

Examples

df <- data.frame(
  response = c(0, 29, 59, 60, 75, 90),
  dose = c(0.00, 9.7656, 39.0626, 156.25, 625, 2500)
)
model <- FitDoseResponse(df)

3D Surface Plot for Nulti-drug Combination Dose-Response/Synergy Scores

Description

This function will generate a surface plot for multi-drug combinations from the output of DimensionReduction. It is an auxiliary function for PlotMultiDrugSurface

Usage

GenerateSurface(
  dim_reduced_data,
  high_value_color,
  low_value_color,
  show_data_points = TRUE,
  point_color,
  plot_title,
  plot_subtitle,
  legend_title,
  z_axis_title,
  text_size_scale = 1,
  axis_line = FALSE,
  colorbar_tick = FALSE,
  x_range = NULL,
  y_range = NULL,
  z_range = NULL,
  color_range = NULL,
  camera_width = NULL,
  camera_height = NULL,
  camera_scale = 1
)

Arguments

dim_reduced_data

A list of data frame. It contains the dimension reduced data for all the data points and other information for plotting. It is the output of DimensionReduction (combination of concentrations). It is

high_value_color

An R color value. It indicates the color for the high values.

low_value_color

An R color value. It indicates the color for low values.

show_data_points

A logical value. If it is TRUE, the raw data points will be shown on the plot. If it is FALSE, no points will be plotted.

point_color

An R color value. It indicates the color for data points.

plot_title

A character value. It is the title for plot.

plot_subtitle

A character value. It is the subtitle for plot.

legend_title

A character value. It is the title for legend.

z_axis_title

A character value. It is the title for z-axis.

text_size_scale

A numeric value. It is used to control the size of text in the plot. All the text size will multiply by this scale factor.

axis_line

A logical value. Whether to show the axis lines and ticks.

colorbar_tick

A logical value. Whether to show the ticks on color bar.

x_range

A numeric vector with two values or NULL. It is used to set the range of x axis (coordinate 1). For example, c(-5, 5) means coordinate 1 ranges from -5 to 5 in the plot. Default value is NULL. The function automatically set the range.

y_range

A numeric vector with two values or NULL. It is used to set the range of y axis (coordinate 2). For example, c(-5, 5) means coordinate 2 ranges from -5 to 5 in the plot. Default value is NULL. The function automatically set the range.

z_range

A vector of two numeric values. They specify the range of z-axis plotted.Default value is NULL. The function automatically set the range.

color_range

A vector of two numeric values. They specify the range of the color bars. The first item (lower bounder) must be less than the second one (upper bounder). The plotted values larger than defined upper bounder will be filled in color high_value_color. The plotted values less than defined lower bounder will be filled in color low_value_color. If the defined range includes 0, value 0 will be filled in color "white". By default, it is set as NULL which means the function will automatically set the color range according to the plotted values.

camera_width

A numeric value or NULL. It indicates the output figure's width on pixel.

camera_height

A numeric value or NULL. It indicates the output figure's height on pixel.

camera_scale

A numeric value. The output plot will multiply title/legend/axis/canvas sizes by this factor.

Value

A ggplot object.

Author(s)


Highlight Bars

Description

It is an auxiliary function for PlotMultiDrugBar

Usage

HighlightBarPlot(selected_data, text_size = 10)

Arguments

selected_data

A data frame. It contain the information for the bars to be highlighted.

text_size

A numeric value. It indicates the label text size in "pt" for the highlighted row.

Value

A ggplot object

Author(s)


Calculate HSA Synergy Score

Description

HSA calculates the synergy score matrix for a block of drug combination by using Highest Single Agent (HSA) reference model.

Usage

HSA(response)

Arguments

response

A data frame. It must contain the columns: "conc1", "conc2", ..., for the concentration of the combined drugs and "response" for the observed %inhibition at certain combination.

Details

This model is a reference model for evaluating the combination effect of two drugs. The basic assumption of this model is "The reference effect of drug combination is the maximal single drug effect".

Value

A data frame containing the concentrations for drugs, reference effect and synergy score estimated by HSA model.

Author(s)

References

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
response <- data$response[data$response$block_id == 1, 
                          c("conc1", "conc2", "response")]
HSA.score <- HSA(response)

Impute Missing Value at IC50 Concentration of Drug

Description

ImputeIC50 uses the particular experiment's values to predict the missing values at the desired IC50 concentration of the drug. This function is only called when trying to fix a drug at its selected IC50 concentration where the response values have not been tested in experiment.

Usage

ImputeIC50(response.mat, col.ic50, row.ic50)

Arguments

response.mat

A matrix. It contains response value of a block of drug combination.

col.ic50

A numeric value. The IC50 value of drug added to columns.

row.ic50

A numeric value. The IC50 value of drug added to rows.

Details

ImputeIC50 fits dose-response models (with drm function) by fixing the concentrations of the other drug successively, and uses each fit to predict the missing value at the combination (missing IC50, fixed conc).

Value

A data frame contains all response value at the IC50 concentration of certein drug. It could be directly passed to function CalculateRI for scoring.

Author(s)


Calculate Loewe Synergy Score

Description

Loewe calculates the synergy score matrix from a dose-response matrix by using a druginteraction reference model introduced by Loewe in 1953.

Usage

Loewe(response, Emin = NA, Emax = NA, quiet = TRUE)

Arguments

response

A data frame. It must contain the columns: "conc1", "conc2", ..., for the concentration of the combined drugs and "response" for the observed %inhibition at certain combination.

Emin

The expected minimum response value in the 4 parameter log-logistic model.

Emax

The expected maximum response value in the 4 parameter log-logistic model.

quiet

A logical value. If it is TRUE then the warning message will not show during calculation.

Details

Loewe model is a reference model for evaluating the combination effect of two drugs. The basic assumption of this model is "The referece effect of drug combination is the expected effect of a drug combined with itself".

The optional arguments drug.col.model, drug.row.model are designed for reuse the single drug dose response model fitting results, if it has been down before. Functions FitDoseResponse and ExtractSingleDrug could be used to calculate these arguments.

Value

A data frame containing the concentrations for drugs, reference effect and synergy score estimated by Loewe model.

Author(s)

References

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
response <- data$response[data$response$block_id == 1, 
                          c("conc1", "conc2", "response")]
Loewe.score <- Loewe(response)

A high-throughput drug combination screening data

Description

A recent drug combination screening for the treatment of diffuse large B-cell lymphoma (DLBCL).

Format

A data frame with the following columns: block_id, drug_row, drug_col, conc_r, conc_c, response, conc_r_unit, conc_c_unit.

References

Mathews Griner LA, Guha R, Shinn P, Young RM, Keller JM, et al. High-throughput combinatorial screening identifies drugs that cooperate with ibrutinib to kill activated B-cell-like diffuse large B-cell lymphoma cells. Proc Natl Acad Sci USA 2014; 111:2349-54.


A high-throughput 3 drug combination screening data

Description

A 3-drug combination screening data on Malaria. It is downloaded from [NCATS Matrix](https://matrix.ncats.nih.gov/) project 2321 "Malaria TACT". It contains 2 blocks, one is synergistic and the other is antagonistic.

Format

A data frame with the following columns: "block_id", "drug1", "drug2", "drug3", "conc1", "conc2", "conc3", "response", "conc_unit1", "conc_unit2", "conc_unit3"


A high-throughput 2 drugs combination screening data with replication

Description

A 2-drug combination screening data on cancer cell lines. It is from publication [(O'Neil, 2016)](https://pubmed.ncbi.nlm.nih.gov/26983881/). It contains 2 blocks, one is synergistic and the other is antagonistic.

Format

A data frame with the following columns: "block_id", "drug1", "drug2", "cell_line_name", "conc1", "conc2", "response", "conc_unit1", "conc_unit2"

References

O’Neil, J., Benita, Y., Feldman, I., Chenard, M., Roberts, B., Liu, Y., Li, J., Kral, A., Lejnine, S., Loboda, A., Arthur, W., Cristescu, R., Haines, B.B., Winter, C., Zhang, T., Bloecher, A., Shumway, S.D., 2016. An Unbiased Oncology Compound Screen to Identify Novel Combination Strategies. Mol Cancer Ther 15, 1155–1162.


2D Contour Plot for 2-drug Combination Dose-Response/Synergy Scores

Description

This function will generate a contour level plot for 2-drug combinations. The axes are the dosage for each drug. The values could be observed response, synergy scores or the reference effects calculated from different models.

Usage

Plot2DrugContour(
  data,
  plot_block = 1,
  drugs = c(1, 2),
  plot_value = "response",
  interpolate_len = 2,
  summary_statistic = NULL,
  dynamic = FALSE,
  grid = TRUE,
  plot_title = NULL,
  axis_line = FALSE,
  col_range = NULL,
  row_range = NULL,
  color_range = NULL,
  high_value_color = "#FF0000",
  low_value_color = "#00FF00",
  text_size_scale = 1
)

Arguments

data

A list object generated by function ReshapeData.

plot_block

A character/integer. It indicates the block ID for the block to visualize.

drugs

A vector of characters or integers with length of 2. It contains the index for two drugs to plot. For example, c(1, 2) indicates to plot "drug1" and "drug2" in the input data.

plot_value

A character value. It indicates the score or response value to be visualized. If the data is the direct output from ReshapeData, the available values for this parameter are:

  • response_origin The original response value in input data. It might be % inhibition or % viability.

  • response The % inhibition after preprocess by function ReshapeData

If the data is the output from CalculateSynergy, following values are also available:

  • ZIP_ref, Bliss_ref, HSA_ref, Loewe_ref The reference additive effects calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_synergy, Bliss_synergy, HSA_synergy, Loewe_synergy The synergy score calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_fit The response fitted by ZIP model.

interpolate_len

An integer. It specifies how many values need to be interpolated between two concentrations. It is used to control the smoothness of the synergy surface.

summary_statistic

A vector of characters or NULL. It indicates the summary statistics for all the plot_value in whole combination matrix. Available values are:

  • mean Median value for all the responses or synergy scores in the matrix and the p-value if it is valid;

  • median Median value for all the responses or synergy scores in the matrix;

  • quantile_90 90% quantile. User could change the number to print different sample quantile. For example quantile_50 equal to median.

If it is NULL, no statistics will be printed.

dynamic

A logical value. If it is TRUE, this function will use plot_ly to generate an interactive plot. If it is FALSE, this function will use wireframe to generate a static plot.

grid

A logical value. It indicates whether to add grids.

plot_title

A character value. It specifies the plot title. If it is NULL, the function will automatically generate a title.

axis_line

A logical value. Whether to show the axis lines and ticks.

col_range

A vector of two integers. They specify the starting and ending concentration of the drug on x-axis. Use e.g., c(1, 3) to specify that only from 1st to 3rd concentrations of the drug on x-axis are used. By default, it is NULL so all the concentrations are used.

row_range

A vector of two integers. They specify the starting and ending concentration of the drug on y-axis. Use e.g., c(1, 3) to specify that only from 1st to 3rd concentrations of the drug on y-axis are used. By default, it is NULL so all the concentrations are used.

color_range

A vector of two numeric values. They specify the range of the color bars. The first item (lower bounder) must be less than the second one (upper bounder). The plotted values larger than defined upper bounder will be filled in color high_value_color. The plotted values less than defined lower bounder will be filled in color low_value_color. If the defined range includes 0, value 0 will be filled in color "white". By default, it is set as NULL which means the function will automatically set the color range according to the plotted values.

high_value_color

An R color value. It indicates the color for the high values.

low_value_color

An R color value. It indicates the color for low values.

text_size_scale

A numeric value. It is used to control the size of text in the plot. All the text size will multiply by this scale factor.

Value

If dynamic = FALSE, this function will return a plot project recorded by recordPlot. If dynamic = FALSE, this function will return a plotly plot object.

Author(s)

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
Plot2DrugContour(data)

Heatmap Plot for 2-drug Combination Dose-Response/Synergy Scores

Description

This function will generate a plot for 2-drug combinations. The axes are the dosage at which drugs are tested. The values could be observed response, synergy scores or the reference effects calculated from different models.

Usage

Plot2DrugHeatmap(
  data,
  plot_block = 1,
  drugs = c(1, 2),
  plot_value = "response",
  statistic = NULL,
  summary_statistic = NULL,
  dynamic = FALSE,
  plot_title = NULL,
  col_range = NULL,
  row_range = NULL,
  color_range = NULL,
  high_value_color = "#FF0000",
  low_value_color = "#00FF00",
  text_label_size_scale = 1,
  text_label_color = "#000000",
  title_text_size_scale = 1
)

Arguments

data

A list object generated by function ReshapeData.

plot_block

A character/integer. It indicates the block ID for the block to visualize.

drugs

A vector of characters or integers with length of 2. It contains the index for two drugs to plot. For example, c(1, 2) indicates to plot "drug1" and "drug2" in the input data.

plot_value

A character value. It indicates the value to be visualized. If the data is the direct output from ReshapeData, the values for this parameter are:

  • response_origin The original response value in input data. It might be % inhibition or % viability.

  • response The % inhibition after preprocess by function ReshapeData

If the data is the output from CalculateSynergy, following values are also available:

  • ZIP_ref, Bliss_ref, HSA_ref, Loewe_ref The reference additive effects calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_synergy, Bliss_synergy, HSA_synergy, Loewe_synergy The synergy score calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_fit The response fitted by ZIP model.

statistic

A character or NULL. It indicates the statistics printed in the plot while there are replicates in input data. Available values are:

  • sd Standard deviation;

  • sem Standard error of mean;

  • ci 95% confidence interval.

If it is NULL, no statistics will be printed.

summary_statistic

A vector of characters or NULL. It indicates the summary statistics for all the plot_value in whole combination matrix. Available values are:

  • mean Median value for all the responses or synergy scores in the matrix and the p-value if it is valid;

  • median Median value for all the responses or synergy scores in the matrix;

  • quantile_90 90% quantile. User could change the number to print different sample quantile. For example quantile_50 equal to median.

If it is NULL, no statistics will be printed.

dynamic

A logical value. If it is TRUE, this function will use plot_ly to generate an interactive plot. If it is FALSE, this function will use wireframe to generate a static plot.

plot_title

A character value. It specifies the plot title. If it is NULL, the function will automatically generate a title.

col_range

A vector of two integers. They specify the starting and ending concentration of the drug on x-axis. Use e.g., c(1, 3) to specify that only from 1st to 3rd concentrations of the drug on x-axis are used. By default, it is NULL so all the concentrations are used.

row_range

A vector of two integers. They specify the starting and ending concentration of the drug on y-axis. Use e.g., c(1, 3) to specify that only from 1st to 3rd concentrations of the drug on y-axis are used. By default, it is NULL so all the concentrations are used.

color_range

A vector of two numeric values. They specify the range of the color bars. The first item (lower bounder) must be less than the second one (upper bounder). The plotted values larger than defined upper bounder will be filled in color high_value_color. The plotted values less than defined lower bounder will be filled in color low_value_color. If the defined range includes 0, value 0 will be filled in color "white". By default, it is set as NULL which means the function will automatically set the color range according to the plotted values.

high_value_color

An R color value. It indicates the color for the high values.

low_value_color

An R color value. It indicates the color for low values.

text_label_size_scale

A numeric value. It is used to control the size text labels on the heatmap. The text size will multiply by this scale factor.

text_label_color

NULL or an R color value. It indicates the color for text labels on the heatmap. If it is NULL, no text will be shown.

title_text_size_scale

A numeric value. It is used to control the size of legend title, legend text, plot title, axis title, axis tick, subtitle. All the text size will multiply by this scale factor.

Value

A ggplot plot object.

Author(s)

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
Plot2DrugHeatmap(data)

3D Surface Plot for 2-drug Combination Dose-Response/Synergy Scores

Description

This function will generate a surface plot for 2-drug combinations. The axes are the dosage for each drug. The values could be observed response, synergy scores or the reference effects calculated from different models.

Usage

Plot2DrugSurface(
  data,
  plot_block = 1,
  drugs = c(1, 2),
  plot_value = "response",
  summary_statistic = NULL,
  plot_title = NULL,
  interpolate_len = 2,
  axis_line = FALSE,
  col_range = NULL,
  row_range = NULL,
  z_range = NULL,
  color_range = NULL,
  dynamic = FALSE,
  grid = TRUE,
  high_value_color = "#FF0000",
  low_value_color = "#00FF00",
  text_size_scale = 1
)

Arguments

data

A list object generated by function ReshapeData.

plot_block

A character/integer. It indicates the block ID for the block to visualize.

drugs

A vector of characters or integers with length of 2. It contains the index for two drugs to plot. For example, c(1, 2) indicates to plot "drug1" and "drug2" in the input data.

plot_value

A character value. It indicates the score or response value to be visualized. If the data is the direct output from ReshapeData, the available values for this parameter are:

  • response_origin The original response value in input data. It might be % inhibition or % viability.

  • response The % inhibition after preprocess by function ReshapeData

If the data is the output from CalculateSynergy, following values are also available:

  • ZIP_ref, Bliss_ref, HSA_ref, Loewe_ref The reference additive effects calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_synergy, Bliss_synergy, HSA_synergy, Loewe_synergy The synergy score calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_fit The response fitted by ZIP model.

summary_statistic

A vector of characters or NULL. It indicates the summary statistics for all the plot_value in whole combination matrix. Available values are:

  • mean Median value for all the responses or synergy scores in the matrix and the p-value if it is valid;

  • median Median value for all the responses or synergy scores in the matrix;

  • quantile_90 90% quantile. User could change the number to print different sample quantile. For example quantile_50 equal to median.

If it is NULL, no statistics will be printed.

plot_title

A character value. It specifies the plot title. If it is NULL, the function will automatically generate a title.

interpolate_len

An integer. It specifies how many values need to be interpolated between two concentrations. It is used to control the smoothness of the synergy surface.

axis_line

A logical value. It specifies whether to show the axis lines and ticks in dynamic plot. Axis lines are always shown in the static plot.

col_range

A vector of two integers. They specify the starting and ending concentration of the drug on x-axis. Use e.g., c(1, 3) to specify that only from 1st to 3rd concentrations of the drug on x-axis are used. By default, it is NULL so all the concentrations are used.

row_range

A vector of two integers. They specify the starting and ending concentration of the drug on y-axis. Use e.g., c(1, 3) to specify that only from 1st to 3rd concentrations of the drug on y-axis are used. By default, it is NULL so all the concentrations are used.

z_range

A vector of two numeric values. They specify the range of z-axis plotted.Default value is NULL. The function automatically set the range.

color_range

A vector of two numeric values. They specify the range of the color bars. The first item (lower bounder) must be less than the second one (upper bounder). The plotted values larger than defined upper bounder will be filled in color high_value_color. The plotted values less than defined lower bounder will be filled in color low_value_color. If the defined range includes 0, value 0 will be filled in color "white". By default, it is set as NULL which means the function will automatically set the color range according to the plotted values.

dynamic

A logical value. If it is TRUE, this function will use plot_ly to generate an interactive plot. If it is FALSE, this function will use wireframe to generate a static plot.

grid

A logical value. It indicates whether to add grids on the surface.

high_value_color

An R color value. It indicates the color for the high values.

low_value_color

An R color value. It indicates the color for low values.

text_size_scale

A numeric value. It is used to control the size of text in the plot. All the text size will multiply by this scale factor.

Value

If dynamic = FALSE, this function will return a plot project recorded by recordPlot. If dynamic = FALSE, this function will return a plotly plot object.

Author(s)

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
Plot2DrugSurface(data)
Plot2DrugSurface(data, dynamic = TRUE)

Plot Barometer for Responses at One Data Point

Description

This function will plot a barometer. The needle will point at the response (% inhibition) at the data point specified by plot_concs. The reference additive effects calculated by different models will be marked on the bar if they are included in input data.

Usage

PlotBarometer(
  data,
  plot_block = 1,
  plot_concs,
  graduation_color = "#6C6C6C",
  needle_color = "#6C6C6C",
  needle_text_size = 5,
  needle_text_offset = 2,
  graduation_label_size = 4,
  graduation_label_offset = 0.7,
  annotation_label_size = 4,
  annotation_label_offset = 0.6,
  annotation_label_color = "#6C6C6C",
  font_family = "",
  color_bar_color = "#8f1b01",
  color_bar_outer = 9,
  color_bar_inner = 8,
  major_graduation_outer = 7.8,
  minor_graduation_inner = 7.5,
  major_graduation_inner = 7,
  show_concs = TRUE
)

Arguments

data

A list object generated by function CalculateSynergy.

plot_block

An integer or character. It indicates the block id for the combination matrix to visualize.

plot_concs

A vector of numeric values with the length same as the number of drugs in selected block. It contains the concentrations for "drug1", "drug2", ... The data point selected by these concentrations will be highlighted in the plot.

graduation_color

An R color value. It indicates the color of the graduation texts and ticks.

needle_color

An R color value. It indicates the color of the needle.

needle_text_size

A numeric value. It indicates the size of the text near the center of barometer which showing the response value. The unit is "mm".

needle_text_offset

A numeric value. It is used to set the position of the response values text. Smaller value means the text is closer to the center.

graduation_label_size

A numeric value. It indicates the size of the graduation texts. The unit is "mm".

graduation_label_offset

A numeric value. It is used to set the position of graduation texts. Smaller values means the graduation texts is closer to the ticks. It ranges from 0 to 1.

annotation_label_size

A numeric value. It indicates the size of the labels for the additive effects at the out-most layer. The unit is "mm".

annotation_label_offset

A numeric value. It is used to set the position of additive effect labels. Smaller values means the labels is closer to the color bar. It ranges from 0 to 1.

annotation_label_color

An R color value. It indicates the color of the additive effects at the out-most layer.

font_family

The font family for all the texts in the plot.

color_bar_color

An R color value. It indicates the color of the largest value in the color bar.

color_bar_outer

A numerical value. It indicates the proportion of the radius for the outer side of color bar comparing to the outermost edge for plotting area. It ranges from 0 to 1.

color_bar_inner

A numerical value. It indicates the proportion of the radius for the inner side of color bar comparing to the outermost edge for plotting area. It ranges from 0 to 1.

major_graduation_outer

A numerical value. It indicates the proportion of the radius for the outer side of graduation comparing to the outermost edge for plotting area. It ranges from 0 to 1.

minor_graduation_inner

A numerical value. It indicates the proportion of the radius for the outer side of graduation comparing to the outermost edge for plotting area. It ranges from 0 to 1.

major_graduation_inner

A numerical value. It indicates the proportion of the radius for the outer side of graduation comparing to the outermost edge for plotting area. It ranges from 0 to 1.

show_concs

A logical value. If it is TRUE, the concentration of drugs will be shown on the plot.

Value

A ggplot object.

Author(s)

References

Tang J, Wennerberg K and Aittokallio T (2015) hrefhttps://www.frontiersin.org/articles/10.3389/fphar.2015.00181/fullWhat is synergy? The Saariselkä agreement revisited. Front. Pharmacol. 6:181. doi: 10.3389/fphar.2015.00181

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
data <- CalculateSynergy(data, method = c("ZIP", "HSA", "Bliss", "Loewe"))
p <- PlotBarometer(data, plot_block = 1, c(625, 50))
p

Visualize the Drug Combination Dose-response Data

Description

A function to visualize the drug combination dose-response data

Usage

PlotDoseResponse(
  data,
  block_ids = c(1),
  drugs = c(1, 2),
  adjusted = TRUE,
  statistic = NULL,
  summary_statistic = "mean",
  high_value_color = "#FF0000",
  low_value_color = "#00FF00",
  point_color = "#C24B40",
  curve_color = "black",
  curve_ylim = NULL,
  curve_grid = TRUE,
  text_size_scale = 1,
  heatmap_text_label_size_scale = 1,
  heatmap_text_label_color = "#000000",
  heatmap_color_range = NULL,
  curve_plot_title = NULL,
  heatmap_plot_title = NULL,
  Emin = NA,
  Emax = NA,
  save_file = FALSE,
  file_type = "pdf",
  file_name = NULL,
  width = 12,
  height = 6
)

Arguments

data

A list object generated by function ReshapeData.

block_ids

A vector of characters/integers or NULL. It contains the block IDs for the blocks to visualize. By default, it is NULL so that the visualization of all the drug combinations in input data.

drugs

A vector of characters or integers with length of 2. It contains the index for two drugs to plot. For example, c(1, 2) indicates to plot "drug1" and "drug2" in the input data.

adjusted

A logical value. If it is FALSE, original response matrix will be plotted. If it is TRUE, adjusted response matrix will be plotted.

statistic

A character or NULL. It indicates the statistics printed in the plot while there are replicates in input data. Available values are:

  • sem Standard error of mean;

  • ci 95

If it is NULL, no statistics will be printed.

summary_statistic

A vector of characters or NULL. It indicates the summary statistics printed in heatmap for all the plot_value in whole combination matrix. Available values are:

  • mean Median value for all the responses or synergy scores in the matrix and the p-value if it is valid;

  • median Median value for all the responses or synergy scores in the matrix;

  • quantile_90 90 print different sample quantile. For example quantile_50 equal to median.

If it is NULL, no statistics will be printed.

high_value_color

An R color value. It indicates the color for the high values.

low_value_color

An R color value. It indicates the color for low values.

point_color

An R color value. It indicates the color for points in dose response curve plots.

curve_color

An R color value. It indicates the color for curves in dose response curve plots.

curve_ylim

A vector of two numeric values or NULL. It is used to set the y limits (y1, y2) of the dose-response curve plot. Note that y1 > y2 is allowed and leads to a ‘reversed axis’. With the default value, NULL, the function will automatically set the y axis.

curve_grid

A logical value. It indicates whether to add grids on the dose-response curve pot.

text_size_scale

A numeric value. It is used to control the size of text in the plot. All the text size will multiply by this scale factor.

heatmap_text_label_size_scale

A numeric value. It is used to control the size of text labels in the heatmap plot. It only works while plot_type = "heatmap".

heatmap_text_label_color

NULL or an R color value. It is used to control the color of text labels in the heatmap plot. If it is NULL, text label will not be shown.It only works while plot_type = "heatmap".

heatmap_color_range

A vector of two numeric values. They specify the range of the color bar in heatmap plot. The first item (lower bounder) must be less than the second one (upper bounder). The plotted values larger than defined upper bounder will be filled in color high_value_color. The plotted values less than defined lower bounder will be filled in color low_value_color. If the defined range includes 0, value 0 will be filled in color "white". By default, it is set as NULL which means the function will automatically set the color range according to the plotted values.

curve_plot_title

A character value to indicate the plot title for the dose-response curve.

heatmap_plot_title

A character value to indicate the plot title for the heatmap.

Emin

A numeric or NA. the minimal effect of the drug used in the 4-parameter log-logistic function to fit the dose-response curve. If it is not NA, it is fixed the value assigned by the user. Default setting is NA.

Emax

A numeric or NA. the maximal effect of the drug used in the 4-parameter log-logistic function to fit the dose-response curve. If it is not NA, it is fixed the value assigned by the user. Default setting is NA.

save_file

A parameter to specify if the visualization results are saved as pdf files in current working directory or not. If it is FALSE, the results are returned as a list of the plots. It is FALSE by default.

file_type

A character. It indicates the format of files you want to save as. Default is "pdf". Available values are "jpeg", "bmp", "png", "tiff", "pdf", "svg".

file_name

A character vector. It indicates the file names, if user chose to save the plot to local directory.If it is not defined by user, a default name will be assigned.

width

a numeric value. It indicates the width of saved file.

height

a numeric value. It indicates the height of saved file.

Value

A list of plot objects recorded by recordPlot. The plot will be saved into a local file if save_file = TRUE. If save_file = FALSE, the plot will be printed in default graphic device.

Author(s)

Examples

## Not run: 
data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
plots <- PlotDoseResponse(data)

## End(Not run)

Plot Dose Response Curve for Single Drug

Description

This function will pot the dose response curve fitted by 4 parameters log-logistic curve.

Usage

PlotDoseResponseCurve(
  data,
  plot_block = 1,
  drug_index = 1,
  adjusted = TRUE,
  Emin = NA,
  Emax = NA,
  grid = TRUE,
  point_color = "#C24B40",
  curve_color = "black",
  text_size_scale = 1,
  plot_title = NULL,
  plot_subtitle = NULL,
  plot_setting = list(cex.lab = 1 * text_size_scale, mgp = c(2, 0.5, 0), font.main = 2,
    font.lab = 1, cex.main = 14/12 * text_size_scale, bty = "l", lwd = 1.5),
  plot_new = TRUE,
  record_plot = TRUE,
  ...
)

Arguments

data

A list object generated by function ReshapeData.

plot_block

A character/integer. It indicates the block ID for the block to visualize.

drug_index

A character/integer. It indicates the index of the drug to plot. For example, 1 or "1" indicates to plot "drug1" in the input data.

adjusted

A logical value. If it is FALSE, original response value will be used to fit the curve. If it is TRUE, the response values adjusted by (adding noise and/or imputation) will be plotted.

Emin

A numeric or NA. the minimal effect of the drug used in the 4-parameter log-logistic function to fit the dose-response curve. If it is not NA, it is fixed the value assigned by the user. Default setting is NA.

Emax

A numeric or NA. the maximal effect of the drug used in the 4-parameter log-logistic function to fit the dose-response curve. If it is not NA, it is fixed the value assigned by the user. Default setting is NA.

grid

A logical value. It indicates whether to show the grids in the plots. The default value is TRUE. If grid = NULL or grid = FALSE, there is no grid.

point_color

An R color value. It indicates the color for points in dose response curve plots.

curve_color

An R color value. It indicates the color for curves in dose response curve plots.

text_size_scale

A numeric value. It is used to control the size of text in the plot. All the text size will multiply by this scale factor.

plot_title

A character value or NULL. It specifies the plot title. If it is NULL, the function will automatically generate a title.

plot_subtitle

A character or NULL. It indicates the subtitle for the plot. If it is NULL, the function will automatically generate a subtitle.

plot_setting

A list of graphical arguments. The arguments are passed to par function to modify the appearance of plots.

plot_new

A logic value. If it is TRUE, a new device will be initiate with plot.new. You might want to set it as FALSE while combining with other plots by using layout function.

record_plot

A logic value. If it is TRUE, a plot object recorded by recordPlot will be returned. If it is FALSE, this function will return NULL.

...

Additional graphical arguments that are inherited from link[drc]plot.drc function. For example, use xlim = c(0.5, 500) or ylim = (0, 100) to control the ranges of x-axis or y-axis, respectively.

Value

A plot object recorded by recordPlot or NULL.

Author(s)

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
p <- PlotDoseResponseCurve(data, plot_block = 1, drug_index = 2, grid = NULL)
replayPlot(p)

Bar Plot for Multi-drug Combination Dose-Response/Synergy Scores

Description

This function will generate a group of bar plots for one drug combination block. Each panel (columns) visualize the concentrations for all the drugs and metrics specified by plot_values. Each row represents a data point in the combination data. The data point specified by highlight_row will be highlighted in different color.

Usage

PlotMultiDrugBar(
  data,
  plot_block = 1,
  plot_value = c("response", "response_origin"),
  sort_by = "response",
  highlight_row = NULL,
  pos_value_color = "#CC3311",
  neg_value_color = "#448BD4",
  highlight_pos_color = "#A90217",
  highlight_neg_color = "#2166AC",
  panel_title_size = 10,
  axis_text_size = 10,
  highlight_label_size = 5,
  data_table = FALSE
)

Arguments

data

A list object generated by function ReshapeData.

plot_block

A character/integer. It indicates the block ID for the block to visualize.

plot_value

A vector of characters. It contains the name of one or more metrics to be visualized. If the data is the direct output from ReshapeData, the values for this parameter are:

  • response_origin The original response value in input data. It might be % inhibition or % viability.

  • response The % inhibition after preprocess by function ReshapeData

If the data is the output from CalculateSynergy, following values are also available:

  • ZIP_ref, Bliss_ref, HSA_ref, Loewe_ref The reference additive effects calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_synergy, Bliss_synergy, HSA_synergy, Loewe_synergy The synergy score calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_fit The response fitted by ZIP model.

sort_by

A character. It indicates by which metric the bars (data points) will be sorted. It could be one of the available values for plot_value or one of the concentration columns (e.g. "cocn1", "conc2", ...)

highlight_row

A vector of numeric values with the length same as the number of drugs in selected block. It contains the concentrations for "drug1", "drug2", ... The data point selected by these concentrations will be highlighted in the plot.

pos_value_color

An R color value. It indicates the color for the positive values.

neg_value_color

An R color value. It indicates the color for the negative values.

highlight_pos_color

An R color value. It indicates the highlight color for the positive values.

highlight_neg_color

An R color value. It indicates the highlight color for the negative values.

panel_title_size

A numeric value. It indicates the size of panel titles in unit "mm".

axis_text_size

A numeric value. It indicates the size of axis texts in unit "mm".

highlight_label_size

A numeric value. It indicates the size of the labels for highlighted rows in unit "mm".

data_table

A logic value. If it is TRUE, the data frame used for plotting will be output.

Value

A ggplot object. If data_table = TRUE, the output will be a list containing a ggplot object and a data frame used for plotting.

Author(s)

Examples

data("NCATS_screening_data")
data <- ReshapeData(NCATS_screening_data)
data <- CalculateSynergy(data, method = c("HSA"))
p <- PlotMultiDrugBar(data, 
  plot_block = 1,
  plot_value = c("response", "HSA_ref", "HSA_synergy"),
  highlight_row = c(0, 0, 0),
  sort_by = "HSA_synergy"
)
p

3D Plot for Multi-drug Combination Dose-Response/Synergy Scores

Description

This function will generate a dynamic 3D plot response values or synergy scores for all the observed data points in a multi-drug combination block. The concentrations of drugs will be projected to 2 dimensions and plot along x an y axis. A surface for the selected plot_value and points for all the concentration combinations will be plotted.

Usage

PlotMultiDrugSurface(
  data,
  plot_block = 1,
  plot_value = "response",
  summary_statistic = NULL,
  plot_title = NULL,
  distance_method = "mahalanobis",
  high_value_color = "#FF0000",
  low_value_color = "#00FF00",
  show_data_points = TRUE,
  point_color = "#DDA137",
  text_size_scale = 1,
  axis_line = FALSE,
  colorbar_tick = FALSE,
  x_range = NULL,
  y_range = NULL,
  z_range = NULL,
  color_range = NULL,
  camera_width = NULL,
  camera_height = NULL,
  camera_scale = 1
)

Arguments

data

A list object generated by function ReshapeData.

plot_block

A character/integer. It indicates the block ID for the block to visualize.

plot_value

A vector of characters. It contains the name of one or more metrics to be visualized. If the data is the direct output from ReshapeData, the values for this parameter are:

  • response_origin The original response value in input data. It might be % inhibition or % viability.

  • response The % inhibition after preprocess by function ReshapeData

If the data is the output from CalculateSynergy, following values are also available:

  • ZIP_ref, Bliss_ref, HSA_ref, Loewe_ref The reference additive effects calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_synergy, Bliss_synergy, HSA_synergy, Loewe_synergy The synergy score calculated by ZIP, Bliss, HSA or Loewe model, respectively.

  • ZIP_fit The response fitted by ZIP model.

summary_statistic

A vector of characters or NULL. It indicates the summary statistics for all the plot_value in whole combination matrix. Available values are:

  • mean Median value for all the responses or synergy scores in the matrix and the p-value if it is valid;

  • median Median value for all the responses or synergy scores in the matrix;

  • quantile_90 90% quantile. User could change the number to print different sample quantile. For example quantile_50 equal to median.

If it is NULL, no statistics will be printed.

plot_title

A charactor value. It specifies the plot title. If it is NULL, the function will automatically generate a title.

distance_method

The methods to calculate the distance between different data points from the concentration of drugs. The distance matrix is used for dimension reduction. This parameter is used to set the parameter method for vegdist. The default values is "mahalanobis".

high_value_color

An R color value. It indicates the color for the high values.

low_value_color

An R color value. It indicates the color for low values.

show_data_points

A logical value. If it is TRUE, the raw data points will be shown on the plot. If it is FALSE, no points will be plotted.

point_color

An R color value. It indicates the color for data points.

text_size_scale

A numeric value. It is used to control the size of text in the plot. All the text size will multiply by this scale factor.

axis_line

A logical value. Whether to show the axis lines and ticks.

colorbar_tick

A logical value. Whether to show the ticks on color bar.

x_range

A numeric vector with two values or NULL. It is used to set the range of x axis (coordinate 1). For example, c(-5, 5) means coordinate 1 ranges from -5 to 5 in the plot. Default value is NULL. The function automatically set the range.

y_range

A numeric vector with two values or NULL. It is used to set the range of y axis (coordinate 2). For example, c(-5, 5) means coordinate 2 ranges from -5 to 5 in the plot. Default value is NULL. The function automatically set the range.

z_range

A vector of two numeric values. They specify the range of z-axis plotted.Default value is NULL. The function automatically set the range.

color_range

A vector of two numeric values. They specify the range of the color bars. The first item (lower bounder) must be less than the second one (upper bounder). The plotted values larger than defined upper bounder will be filled in color high_value_color. The plotted values less than defined lower bounder will be filled in color low_value_color. If the defined range includes 0, value 0 will be filled in color "white". By default, it is set as NULL which means the function will automatically set the color range according to the plotted values.

camera_width

A numeric value or NULL. It indicates the output figure's width on pixel.

camera_height

A numeric value or NULL. It indicates the output figure's height on pixel.

camera_scale

A numeric value. The output plot while clicking the camera button.will multiply title/legend/axis/canvas sizes by this factor.

Value

A plotly plot object.

Author(s)

Examples

data("NCATS_screening_data")
data <- ReshapeData(NCATS_screening_data)
p <- PlotMultiDrugSurface(
  data,
  plot_block = 1,
  plot_value = "response",
  show_data_points = TRUE,
  distance_method = "mahalanobis",
  summary_statistic = "mean"
)
p

Plot Sensitive-Synergy Plot for All the Combinations in the Input Data

Description

This function will generate a scatter plot for all the combinations in the input data. The x-axis is the Combination Sensitive score (CSS).

Usage

PlotSensitivitySynergy(
  data,
  plot_synergy,
  point_size = 1,
  point_color = "#2D72AD",
  show_labels = FALSE,
  point_label_color = "#2D72AD",
  label_size = 10,
  dynamic = FALSE,
  plot_title = NULL,
  axis_line = FALSE,
  text_size_scale = 1
)

Arguments

data

A list object has been processed by functions: ReshapeData, CalculateSynergy, and CalculateSensitivity.

plot_synergy

A character value. It indicates the synergy score for visualization. The available values are: "ZIP", "HSA", Bliss", "Leowe".

point_size

A numeric value. It indicates the size of points. The unit is "mm"

point_color

An R color value. It indicates the color for the points.

show_labels

A logic value. It indicates whether to show the labels along with points or not.

point_label_color

An R color value. It indicates the color for the label of data points.

label_size

A numeric value. It controls the size of the labels in "pt"

dynamic

A logical value. If it is TRUE, this function will use plot_ly to generate an interactive plot. If it is FALSE, this function will use wireframe to generate a static plot.

plot_title

A character value. It specifies the plot title. If it is NULL, the function will automatically generate a title.

axis_line

A logical value. Whether to show the axis lines and ticks.

text_size_scale

A numeric value. It is used to control the size of text for axis in the plot. All the text size will multiply by this scale factor.

Value

A ggplot object, while dynamic = FALSE. A plotly object, while dynamic = TRUE.

Author(s)

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
data <- CalculateSynergy(data, method = c("ZIP"))
data <- CalculateSensitivity(data)
PlotSensitivitySynergy(data, plot_synergy = "ZIP")

Plot Interaction Landscape for Synergy Scores

Description

A function to visualize the synergy scores for drug combinations as 2D or 3D interaction landscape over the dose-response matrix.

Usage

PlotSynergy(
  data,
  type = "2D",
  method = "ZIP",
  block_ids = c(1),
  drugs = c(1, 2),
  row_range = NULL,
  col_range = NULL,
  color_range = NULL,
  z_range = NULL,
  axis_line = FALSE,
  statistic = NULL,
  summary_statistic = "mean",
  plot_title = NULL,
  interpolate_len = 3,
  high_value_color = "#FF0000",
  low_value_color = "#00FF00",
  text_size_scale = 1,
  heatmap_text_label_size_scale = 1,
  heatmap_text_label_color = "#000000",
  grid = TRUE,
  dynamic = FALSE,
  display = TRUE,
  save_file = FALSE,
  file_type = "pdf",
  file_name = NULL,
  file_path = NULL,
  height = 6,
  width = 6,
  units = "in"
)

Arguments

data

A list object generated by function CalculateSynergy

type

A character value. It specifies the type of the plot. Available values are:

  • 2D Visualize 2D interactive landscape with contour plot.

  • heatmap Heatmap for synergy scores.

  • 3D Visualize 3D surface for interactive landscape.

method

A character value. It indicates which synergy score to be visualized. Available values are "ZIP", "HSA", "Bliss", or "Loewe".

block_ids

A parameter to specify which drug combination if there are many drug combinations in the data. By default, it is NULL so that the synergy score visualization of all the drug combinations in the data is returned.

drugs

A vector of characters or integers with length of 2. It contains the index for two drugs to plot. For example, c(1, 2) indicates to plot "drug1" and "drug2" in the input data.

row_range

A vector of two integers. They specify the starting and ending concentration of the drug on y-axis. Use e.g., c(1, 3) to specify that only from 1st to 3rd concentrations of the drug on y-axis are used. By default, it is NULl so all the concentrations are used.

col_range

A vector of two integers. They specify the starting and ending concentration of the drug on x-axis. Use e.g., c(1, 3) to specify that only from 1st to 3rd concentrations of the drug on x-axis are used. By default, it is NULl so all the concentrations are used.

color_range

A vector of two numeric values. They specify the range of the color bars. The first item (lower bounder) must be less than the second one (upper bounder). The plotted values larger than defined upper bounder will be filled in color high_value_color. The plotted values less than defined lower bounder will be filled in color low_value_color. If the defined range includes 0, value 0 will be filled in color "white". By default, it is set as NULL which means the function will automatically set the color range according to the plotted values.

z_range

A vector of two numeric values. They specify the range of z-axis plotted in 3D surface plot. It doesn't work for 2D or heatmap plots. Default value is NULL. The function automatically set the range.

axis_line

A logical value. Whether to show the axis lines and ticks. It doesn't work for heatmap plot.

statistic

A character or NULL. It indicates the statistics printed in the plot while there are replicates in input data. Available values are:

  • sem Standard error of mean;

  • ci 95% confidence interval.

If it is NULL, no statistics will be printed. Note: It only works in Heatmap plot.

summary_statistic

A vector of characters or NULL. It indicates the summary statistics for all the plot_value in whole combination matrix. Available values are:

  • mean Median value for all the responses or synergy scores in the matrix and the p-value if it is valid;

  • median Median value for all the responses or synergy scores in the matrix;

  • quantile_90 90% quantile. User could change the number to print different sample quantile. For example quantile_50 equal to median.

If it is NULL, no statistics will be printed.

plot_title

A character value. It specifies the plot title. If it is NULL, the function will automatically generate a title.

interpolate_len

An integer. It specifies how many values need to be interpolated between two concentrations. It is used to control the smoothness of the synergy surface in the contour plot and surface plot. Note: It only works in 2D and 3D plots.

high_value_color

An R color value. It indicates the color for the high values.

low_value_color

An R color value. It indicates the color for low values.

text_size_scale

A numeric value. It is used to control the size of text in the plot. All the text size will multiply by this scale factor.

heatmap_text_label_size_scale

A numeric value. It is used to control the size of text labels in the heatmap plot. It only works while plot_type = "heatmap".

heatmap_text_label_color

NULL or an R color value. It is used to control the color of text labels in the heatmap plot. If it is NULL, text label will not be shown. It only works while plot_type = "heatmap".

grid

A logical value. It indicates whether to add grids on the pot. It only works while plot_type = "3D" or plot_type = "2D".

dynamic

A logic value. It indicates whether to generate interactive plot wit package "plotly" or static plot with package "ggplot2"/"lattice".

display

A logic value. It specifies whether to automatically display plots while calling the function.

save_file

A logic value. It specifies if the interaction landscapes is saved by calling ggsave function ("2D" or "heatmap" plots) or plot saving function defined by device ("3D" plots). By default, it is FALSE. Note: It doesn't work while dynamic = TRUE, because installation of "Orca" is required for exporting plotly plots. Please check https://plotly.com/r/static-image-export/ for more details.

file_type

A character value. It indicates the device to use for saving plots. If type = "3D", the corresponding device function in package "grDevices" will be called to save the plots. If type = "2D"/"heatmap", it will be used to set the parameter device in function ggsave. Note: It only works while save_file = TRUE.

file_name

A character vector. It indicates the file names. If it is not defined by user, a default name will be assigned. Note: It only works while save_file = TRUE.

file_path

A character vector. It indicates the path to save file. If it is not defined by user, a default name will be assigned. Note: It only works while save_file = TRUE.

height

A numeric value. It indicates the height of the output plot. Note: It only works while save_file = TRUE.

width

A numeric value. It indicates the width of the output plot. Note: It only works while save_file = TRUE.

units

A character value. It indicates the units for width and height for saved plots. It is used to set the units parameter in function ggsave or the function selected by file_type (It will not work on "pdf" and "svg" devices. There units are always in inch.). Note: It only works while save_file = TRUE.

Value

A list of ggplot objects.

Author(s)

Examples

data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
data <- CalculateSynergy(data)
plots <- PlotSynergy(data, "2D", block_ids = NULL)

Predict Response Value at Certain Drug Dose

Description

PredictResponse uses drm function to fit the dose response model and generate the predict response value at the given dose.

Usage

PredictResponse(df, dose)

Arguments

df

A data frame. It contains two variable:

  • dose a serial of concentration of drug;

  • response the cell line response to each concentration of drug. It should be the inhibition rate according to negative control.

dose

A numeric vector. It specifies the dose at which user want to predict the response of cell line to the drug.

Details

Note: Random number generator used in AddNoise with method = "random". If the analysis requires for reproductiblity, plesase set the random seed before calling this function.

Value

A numeric vector. It is the response values of cell line to the drug at inputted dose.

Author(s)


Pre-process the Response Data for Further Calculation and Plot

Description

A function to transform the response data from data frame format to dose-response matrices. Several processes could be chose to add noise, impute missing values or correct base line to the dose-response matrix.

Usage

ReshapeData(
  data,
  impute = TRUE,
  impute_method = NULL,
  noise = FALSE,
  seed = NULL,
  iteration = 10,
  data_type = "viability"
)

Arguments

data

drug combination response data in a data frame format

impute

a logical value. If it is TRUE, the NA values will be imputed by mice. Default is TRUE.

impute_method

a single string. It sets the method parameter in function mice to specify the imputation method. Please check the documentation of mice to find the available methods.

noise

a logical value. It indicates whether or not adding noise to to the "response" values in the matrix. Default is TRUE.

seed

a single value, interpreted as an integer, or NULL. It is the random seed for calculating the noise and missing value imputation. Default setting is NULL

iteration

An integer. It indicates the number of iterations for bootstrapping while calculating statistics for data with replicates.

data_type

a parameter to specify the response data type which can be either "viability" or "inhibition".

Details

The input data must contain the following columns: (block_id/BlockId/PairIndex), (drug_row/DrugRow/Drug1), (drug_col/DrugCol/Drug2), (response/Response/inhibition/Inhibition), (conc_r/ConcRow/Conc1), (conc_c/ConcCol/Conc2), and (ConcUnit/conc_r_unit, conc_c_unit/ConcUnit1, ConcUnit2, ConcUnit3)

Value

a list of the following components:

  • drug_pairs A data frame contains the name of all the tested drugs, concentration unit, block IDs and a logical column "replicate" to indicate whether there are replicates in the corresponding block.

  • response A data frame contains the columns: "concX" concentrations for drugs from input data; "response_origin" response values from input data; "response" % inhibition value for downstream analysis.

  • response_statistics A data frame. It will be output if there is block have replicated response values. It contains the block ID, the concentrations for all the tested drugs, and statistics for % inhibition values across replicates (including mean, standard deviation, standard error of mean and 95% confidence interval).

Author(s)

Examples

data("mathews_screening_data")
# set a random number seed for generating the noises
data <- ReshapeData(mathews_screening_data, seed = 1)

Calculate Delta Synergy Score Based on ZIP Model

Description

ZIP calculates the Delta score matrix from a dose-response matrix by using Zero Interaction Potency (ZIP) method.

Usage

ZIP(response, Emin = NA, Emax = NA, quiet = TRUE)

Arguments

response

A data frame. It must contain the columns: "conc1", "conc2", ..., for the concentration of the combined drugs and "response" for the observed %inhibition at certain combination.

Emin

The expected minimum response value in the 4 parameter log-logistic model.

Emax

The expected maximum response value in the 4 parameter log-logistic model.

quiet

A logical value. If it is TRUE then the warning message will not show during calculation.

Details

Zero Interaction Potency (ZIP) is a reference model for evaluating the conbimation effect of two drugs. It captures the effect of drug combination by comparing the change in the potency of the dose-response curves between individual drugs and their combinations.

The optional arguments drug.col.model, drug.row.model are designed for reuse the single drug dose response model fitting results, if it has been down before. Functions FitDoseResponse and ExtractSingleDrug could be used to calculate these arguments.

Value

A data frame containing the concentrations for drugs, reference effect, fitted response and synergy score estimated by ZIP model.

Author(s)

References

Examples

# No single drug fitted modle before
data("mathews_screening_data")
data <- ReshapeData(mathews_screening_data)
response <- data$response[data$response$block_id == 1, 
                          c("conc1", "conc2", "response")]
ZIP_score <- ZIP(response)

## Not run: 
# Parallel processing:
if (future::supportsMulticore()) {
  future::plan(future::multicore)
} else {
  future::plan(future::multisession)
}
ZIP(response)
# future::plan(future::sequential) # Turn off the multicore setting

## End(Not run)