IDAPredict.2drug: Predicts IDA efficacies for 2-Drug Combinations

Description Usage Arguments Details Value Examples

View source: R/IDAPredict.2drug.R

Description

This function creates efficacy predictions for 2-drug combinations using monotherapy efficacy data and the assumptions of independent drug action. When data is available for multiple concentrations of each drug, efficacy predictions are made for all possible concentration combinations.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
IDAPredict.2drug(
  Monotherapy_Data,
  Cell_Line_Name_Column,
  Drug_Name_Column,
  Drug_Concentration_Column,
  Efficacy_Column,
  LowerEfficacyIsBetterDrugEffect,
  Efficacy_Metric_Name = "Efficacy",
  Drug1,
  Drug2,
  Calculate_Uncertainty = FALSE,
  Efficacy_SE_Column = NULL,
  n_Simulations = 1000,
  Calculate_IDAcomboscore_And_Hazard_Ratio = FALSE,
  Average_Duplicate_Records = FALSE,
  Return_Bootstrap_Values = FALSE
)

Arguments

Monotherapy_Data

A data frame where each row contains information about the response of a single cell line to a single drug at a single concentration. Must minimally include columns containing the following information: cell line name, drug name, drug concentration, and measured drug efficacy. May optionally include a column recording the standard error (SE) of the measured drug efficacy.

Cell_Line_Name_Column

A character vector of length 1 containing the name of the column in the Monotherapy_Data data frame which contains cell line names.

Drug_Name_Column

A character vector of length 1 containing the name of the column in the Monotherapy_Data data frame which contains drug names.

Drug_Concentration_Column

A character vector of length 1 containing the name of the column in the Monotherapy_Data data frame which contains drug concentrations.

Efficacy_Column

A character vector of length 1 containing the name of the column in the Monotherapy_Data data frame which contains measured drug efficacies (i.e. percent Viability, percent Cell Growth, etc.).

LowerEfficacyIsBetterDrugEffect

A logic vector of length 1 indicating whether or not lower values in Efficacy_Column indicate a more effective drug effect (i.e. for percent viability). Set TRUE if so. Otherwise, set FALSE if higher values in Efficacy_Column indicate a more effective drug response (i.e. for percent cell death).

Efficacy_Metric_Name

A character vector of length 1 indicating the name of the efficacy metric being used (i.e. Percent_Viability, Percent_Growth, etc.). Used to correctly label column names in output. Defaults to "Efficacy".

Drug1

A character vector of length 1 containing the name of the first drug in the drug combination for which efficacy predictions are to be made.

Drug2

A character vector of length 1 containing the name of the second drug in the drug combination for which efficacy predictions are to be made.

Calculate_Uncertainty

A logic vector of length one indicating whether or not a semi-parametric bootstrap should be performed to estimate uncertainties in the efficacy predictions based on uncertainties in the monotherapy efficacy measurements. Set TRUE if you wish to calculate uncertainties. Defaults to FALSE.

Efficacy_SE_Column

A character vector of length 1 containing the name of the column in the Monotherapy_Data data frame which contains the standard errors of measured drug efficacies. Must be specified if Calculate_Uncertainty is set to TRUE.

n_Simulations

A positive, integer vector of length 1 with a value >= 40 indicating the number of random samples to be drawn when calculating output efficacy prediction uncertainties. Defaults to 1000.

Calculate_IDAcomboscore_And_Hazard_Ratio

A logic vector of length 1 indicating whether or not IDAcomboscores and Hazard Ratios (HRs) should be calculated between monotherapies and the drug combination. Set TRUE if so. Should only be set to TRUE for efficacy metrics that range between 0 and 1 (i.e. percent viability). Defaults to FALSE.

Average_Duplicate_Records

A logic vector of length 1 indicating whether or not duplicated records (where a cell line has multiple records for being tested with a given drug at a given concentration) should be averaged. If TRUE, Efficacy values are averaged, and, if Calculate_Uncertainty is also TRUE, Efficacy_SE values are added in quadrature and divided by the number of duplicate records for that cell line/drug/concentration set.

Return_Bootstrap_Values

A logic vector of length 1 indicating whether or not the function should return the Drug1 Efficacies and Drug2 Efficacies simulated in the semi-parametric bootstrap used to estimate the uncertainties of those values. If equal to TRUE, Calculate_Uncertainty must also equal TRUE.

Details

Uncertainty estimates for values calculated by this function are generated using a semi-parametric bootstrap approach. This is performed in several steps.

  1. Drug1 efficacies for each concentration are simulated by random sampling from normal distributions with means equal to the provided calculated efficacies and standard deviations equal to the provided efficacy standard errors.

  2. Drug2 efficacies are simulated in the same fashion as Drug1 efficacies, except in cases when Drug1 equals Drug2. In such cases, it is assumed that the efficacy values for Drug1 and Drug2 are derived from the same dose-response curve, so each simulated efficacy for Drug2 is matched to the corresponding simulated efficacy from Drug1 using a standard normal deviate.

  3. Efficacy predictions are made for the combination of Drug1 + Drug2 for each cell line and set of simulated efficacies using the assumptions of independent drug action.

  4. Cell lines are randomly sampled with replacement for each simulation as many times as there are original cell lines. The simulated Drug1 monotherapy efficacies and Drug1+Drug2 combination efficacies are then sampled according to the sampled cell lines for each simulation.

  5. Mean efficacies are calculated for the monotherapy and combination treatments for each simulation. If specified to do so, these values are then used to calculate simulated HRs and IDAcomboscores.

  6. The simulated distributions of each efficacy metric are used to estimate uncertainties for those metrics.

Value

Examples

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
#Loading Package
  library(IDACombo)

#Making fake monotherapy dataset
  CellLineNames <- rep(c("CL1", "CL2", "CL3", "CL4", "CL5", "CL6"), 4)
  DrugNames <- c(rep("D1", 12), rep("D2", 12))
  Concentrations <- c(rep(1, 6), rep(2, 6), rep("1.5", 6), rep("3", 6))
  Viability <- c(sample(seq(0.4,1,length.out = 10), 6, replace = TRUE),
                 sample(seq(0.2,0.8,length.out = 10), 6, replace = TRUE),
                 sample(seq(0.4,1,length.out = 10), 6, replace = TRUE),
                 sample(seq(0.2,0.6,length.out = 10), 6, replace = TRUE))
  Viability_SE <- Viability * sample(seq(0,0.1,length.out = 100), 24, replace = TRUE)
  Fake_Data <- data.frame(CellLineNames, DrugNames, Concentrations, Viability, Viability_SE)

#Creating efficacy predictions for D1 + D2 without uncertainty calculations
  IDAPredict.2drug(Monotherapy_Data = Fake_Data,
                   Cell_Line_Name_Column = "CellLineNames",
                   Drug_Name_Column = "DrugNames",
                   Drug_Concentration_Column = "Concentrations",
                   Efficacy_Column = "Viability",
                   Drug1 = "D1",
                   Drug2 = "D2",
                   Calculate_Uncertainty = FALSE,
                   LowerEfficacyIsBetterDrugEffect = TRUE,
                   Efficacy_Metric_Name = "Viability",
                   Calculate_IDAcomboscore_And_Hazard_Ratio = TRUE,
                   Average_Duplicate_Records = FALSE)

#Creating efficacy predictions for D1 + D2 with uncertainty calculations
  IDAPredict.2drug(Monotherapy_Data = Fake_Data,
                   Cell_Line_Name_Column = "CellLineNames",
                   Drug_Name_Column = "DrugNames",
                   Drug_Concentration_Column = "Concentrations",
                   Efficacy_Column = "Viability",
                   Drug1 = "D1",
                   Drug2 = "D2",
                   Calculate_Uncertainty = TRUE,
                   Efficacy_SE_Column = "Viability_SE",
                   LowerEfficacyIsBetterDrugEffect = TRUE,
                   Efficacy_Metric_Name = "Viability",
                   Calculate_IDAcomboscore_And_Hazard_Ratio = TRUE,
                   Average_Duplicate_Records = FALSE)

#Creating efficacy predictions for D1 + D2 with uncertainty calculations
#and returning simulated values from semi-parametric bootstrap
  IDAPredict.2drug(Monotherapy_Data = Fake_Data,
                   Cell_Line_Name_Column = "CellLineNames",
                   Drug_Name_Column = "DrugNames",
                   Drug_Concentration_Column = "Concentrations",
                   Efficacy_Column = "Viability",
                   Drug1 = "D1",
                   Drug2 = "D2",
                   Calculate_Uncertainty = TRUE,
                   Efficacy_SE_Column = "Viability_SE",
                   LowerEfficacyIsBetterDrugEffect = TRUE,
                   Efficacy_Metric_Name = "Viability",
                   Calculate_IDAcomboscore_And_Hazard_Ratio = TRUE,
                   Average_Duplicate_Records = FALSE,
                   Return_Bootstrap_Values = TRUE)

#Converting Viabilty to reduction in viability and redoing calculations
#Note the change in the LowerEfficacyIsBetterDrugEffect flag from TRUE to FALSE
  Reduction_in_Viability <- 1-Viability
  Reduction_in_Viability_SE <- Viability_SE
  Fake_Data <- data.frame(CellLineNames,
                          DrugNames,
                          Concentrations,
                          Reduction_in_Viability,
                          Reduction_in_Viability_SE)
  IDAPredict.2drug(Monotherapy_Data = Fake_Data,
                   Cell_Line_Name_Column = "CellLineNames",
                   Drug_Name_Column = "DrugNames",
                   Drug_Concentration_Column = "Concentrations",
                   Efficacy_Column = "Reduction_in_Viability",
                   Drug1 = "D1",
                   Drug2 = "D2",
                   Calculate_Uncertainty = TRUE,
                   LowerEfficacyIsBetterDrugEffect = FALSE,
                   Efficacy_SE_Column = "Reduction_in_Viability_SE",
                   Efficacy_Metric_Name = "Reduction_In_Viability",
                   Calculate_IDAcomboscore_And_Hazard_Ratio = TRUE,
                   Average_Duplicate_Records = FALSE)

#Changing efficacy metric to percent growth (range -1 to 1)
#Note that calculating Hazard Ratios and IDAcomboscores is no longer valid, so
#Calculate_IDAcomboscore_And_Hazard_Ratio is set to FALSE.
  Percent_Growth <- c(sample(seq(0.4,1,length.out = 10), 6, replace = TRUE),
                      sample(seq(-0.4,0.2,length.out = 10), 6, replace = TRUE),
                      sample(seq(-0.2,0.3,length.out = 10), 6, replace = TRUE),
                      sample(seq(-1,0.2,length.out = 10), 6, replace = TRUE))
  Percent_Growth_SE <- abs(Percent_Growth * sample(seq(0,0.1,length.out = 100), 24, replace = TRUE))
  Fake_Data <- data.frame(CellLineNames,
                          DrugNames,
                          Concentrations,
                          Percent_Growth,
                          Percent_Growth_SE)
  IDAPredict.2drug(Monotherapy_Data = Fake_Data,
                   Cell_Line_Name_Column = "CellLineNames",
                   Drug_Name_Column = "DrugNames",
                   Drug_Concentration_Column = "Concentrations",
                   Efficacy_Column = "Percent_Growth",
                   Drug1 = "D1",
                   Drug2 = "D2",
                   Calculate_Uncertainty = TRUE,
                   LowerEfficacyIsBetterDrugEffect = TRUE,
                   Efficacy_SE_Column = "Percent_Growth_SE",
                   Calculate_IDAcomboscore_And_Hazard_Ratio = FALSE,
                   Efficacy_Metric_Name = "Percent_Growth",
                   Average_Duplicate_Records = FALSE)

#Adding duplicate records for each cell line, and showing behavior with
#Average_Duplicate_Records = FALSE. Should produce warning messages that
#duplicates were found and removed.
  Percent_Growth <- c(sample(seq(0.4,1,length.out = 10), 6, replace = TRUE),
                      sample(seq(-0.4,0.2,length.out = 10), 6, replace = TRUE),
                      sample(seq(-0.2,0.3,length.out = 10), 6, replace = TRUE),
                      sample(seq(-1,0.2,length.out = 10), 6, replace = TRUE))
  Percent_Growth_SE <- abs(Percent_Growth * sample(seq(0,0.1,length.out = 100), 24, replace = TRUE))
  Fake_Data_to_add <- data.frame(CellLineNames,
                          DrugNames,
                          Concentrations,
                          Percent_Growth,
                          Percent_Growth_SE)
  Fake_Data <- rbind(Fake_Data, Fake_Data_to_add)
  IDAPredict.2drug(Monotherapy_Data = Fake_Data,
                   Cell_Line_Name_Column = "CellLineNames",
                   Drug_Name_Column = "DrugNames",
                   Drug_Concentration_Column = "Concentrations",
                   Efficacy_Column = "Percent_Growth",
                   Drug1 = "D1",
                   Drug2 = "D2",
                   Calculate_Uncertainty = TRUE,
                   LowerEfficacyIsBetterDrugEffect = TRUE,
                   Efficacy_SE_Column = "Percent_Growth_SE",
                   Calculate_IDAcomboscore_And_Hazard_Ratio = FALSE,
                   Efficacy_Metric_Name = "Percent_Growth",
                   Average_Duplicate_Records = FALSE)

#Now setting to average duplicate values.
  Fake_Data <- rbind(Fake_Data, Fake_Data_to_add)
  IDAPredict.2drug(Monotherapy_Data = Fake_Data,
                   Cell_Line_Name_Column = "CellLineNames",
                   Drug_Name_Column = "DrugNames",
                   Drug_Concentration_Column = "Concentrations",
                   Efficacy_Column = "Percent_Growth",
                   Drug1 = "D1",
                   Drug2 = "D2",
                   Calculate_Uncertainty = TRUE,
                   LowerEfficacyIsBetterDrugEffect = TRUE,
                   Efficacy_SE_Column = "Percent_Growth_SE",
                   Calculate_IDAcomboscore_And_Hazard_Ratio = FALSE,
                   Efficacy_Metric_Name = "Percent_Growth",
                   Average_Duplicate_Records = TRUE)

Alexander-Ling/IDACombo documentation built on July 31, 2020, 7:31 a.m.