Type: | Package |
Title: | Designing Population PDX Studies |
Version: | 1.0.3 |
Date: | 2018-08-08 |
Description: | Run simulations to assess the impact of various designs features and the underlying biological behaviour on the outcome of a Patient Derived Xenograft (PDX) population study. This project can either be deployed to a server as a 'shiny' app or installed locally as a package and run the app using the command 'populationPDXdesignApp()'. |
License: | GPL (≥ 3) |
Depends: | R (≥ 3.0.0) |
Imports: | devtools, ggplot2, plyr, roxygen2, shiny, shinycssloaders |
Suggests: | testthat |
RoxygenNote: | 6.0.1 |
NeedsCompilation: | no |
Packaged: | 2018-08-08 12:19:41 UTC; kpkr710 |
Author: | Maria Luisa Guerriero [aut, cre], Natasha Karp [aut] |
Maintainer: | Maria Luisa Guerriero <maria.guerriero@astrazeneca.com> |
Repository: | CRAN |
Date/Publication: | 2018-08-08 14:40:07 UTC |
Simulation of a single population PDX experiment
Description
This is an internal function. Please use cautiously if calling directly.
Samples some animals and classify as responders or non-responders based on number of models studied (PDXn), number of mice measured per model (PDXr), the classification accuracy (C_Acc) and the underlying biological response rate (Biol_RR).
Example usage: callsInSingleExperiment(PDXn=8, PDXr=3, C_Acc=0.95, Biol_RR=30)
Usage
callsInSingleExperiment(PDXn, PDXr, C_Acc, Biol_RR)
Arguments
PDXn |
number of PDX models studied |
PDXr |
number of mice measured per PDX model |
C_Acc |
classification accuracy |
Biol_RR |
underlying biological response rate for this treatment |
Value
dataframe with three columns:
- PDXModel is a string that indicates the model id
- PDXclassification is a numeric value that indicates the true biological classification of that PDX - 0 equal non-responder and 1 equal responder
- StudyResult is a numeric value that indicates the classification of the PDX model after sampling - 0 equal non-responder and 1 equal responder
Author(s)
Maria Luisa Guerriero, maria.guerriero@astrazeneca.com
Natasha A. Karp, natasha.karp@astrazeneca.com
Function to return the mode of a vector of values
Description
This is an internal function. Please use cautiously if calling directly. Returns the mode from numeric vector. Example usage: getMode(c(0,1,1))
Usage
getMode(v)
Arguments
v |
vector of numeric values |
Value
a numeric value
Author(s)
Maria Luisa Guerriero, maria.guerriero@astrazeneca.com
Natasha A. Karp, natasha.karp@astrazeneca.com
Function to calculate the number of false calls for a design for a go-no go threshold
Description
This is an internal function. Please use cautiously if calling directly. Returns the number of false calls from a simulation study exploring the impact of varying PDXn and PDXr for an underlying Biol_RR for a particularly go-no go threshold.
A false call can only arise in the situation where the underlying Biol_RR is below the go-no go threshold.
Example usage: noFalseCalls(ImpactVarying_PDXn_PDXr_BRR, GoNoGoThreshold=30)
Usage
noFalseCalls(dataset, GoNoGoThreshold)
Arguments
dataset |
dataset obtained as output from the 'varying_PDXn_PDXr' function |
GoNoGoThreshold |
go-no go threshold |
Value
vector with three elements:
- numeric value indicating the number of experiments simulated
- numeric value indicating the number of experiments which were above the go-no go threshold
- numeric value indicating the FPR
Author(s)
Maria Luisa Guerriero, maria.guerriero@astrazeneca.com
Natasha A. Karp, natasha.karp@astrazeneca.com
Function to calculate the number of missed calls for a design for a go-no go threshold
Description
This is an internal function. Please use cautiously if calling directly.
Returns the number of missed calls from a simulation study exploring the impact of varying PDXn and PDXr for an underlying Biol_RR for a particularly go-no go threshold.
A missed call can only arise in the situation where the underlying Biol_RR exceeds the go-no go threshold. Example usage: noMissedCalls(ImpactVarying_PDXn_PDXr_BRR, GoNoGoThreshold=30)
Usage
noMissedCalls(dataset, GoNoGoThreshold)
Arguments
dataset |
dataset obtained as output from the 'varying_PDXn_PDXr' function |
GoNoGoThreshold |
go-no go threshold |
Value
vector with three elements:
- numeric value indicating the number of experiments simulated
- numeric value indicating the number of experiments which were below the go-no go threshold
- numeric value indicating the percent of missed calls
Author(s)
Maria Luisa Guerriero, maria.guerriero@astrazeneca.com
Natasha A. Karp, natasha.karp@astrazeneca.com
Function to summarise the results for a single simulation representing one experiment
Description
This is an internal function. Please use cautiously if calling directly. From a simulation of a single experiment, the estimated response rate is determined and captured with the meta data (e.g. PDXn, PDXr) for that experiment.
Example usage: outcomeInSingleExperiment(df=outcomeInSingleExperiment_1, PDXn=8, PDXr=3, C_Acc=0.95, Biol_RR=30)
Usage
outcomeInSingleExperiment(df, PDXn, PDXr, C_Acc, Biol_RR)
Arguments
df |
data frame from callsInSingleExperiment |
PDXn |
PDXn |
PDXr |
PDXr |
C_Acc |
the classification accuracy (numeric value between 0 and 1) |
Biol_RR |
Biol_RR |
Value
a vector with 8 values that captures the input design and the estimated response rate for that design from a single simulation
Author(s)
Maria Luisa Guerriero, maria.guerriero@astrazeneca.com
Natasha A. Karp, natasha.karp@astrazeneca.com
Function to run simulations to mimic population PDX studies for a defined scenario
Description
This is an internal function. Please use cautiously if calling directly. Simulations are used to mimic population PDX studies for specified values of PDXn, PDXr, Biol_RR and C_Acc.
Example usage: outcomeMultipleExperiments(PDXn=8, PDXr=3, C_Acc=0.95, Biol_RR=30, iterations=500)
Usage
outcomeMultipleExperiments(PDXn, PDXr, C_Acc, Biol_RR, iterations)
Arguments
PDXn |
PDXn |
PDXr |
PDXr |
C_Acc |
the classification accuracy (numeric value between 0 and 1) |
Biol_RR |
Biol_RR |
iterations |
no of experiments to simulated |
Value
a dataframe where each row represents the results from a simulation mimicking an individual experiment for a particular design with meta data returned to describe the experimental design
Author(s)
Maria Luisa Guerriero, maria.guerriero@astrazeneca.com
Natasha A. Karp, natasha.karp@astrazeneca.com
A function to visualise the false postive rate as a function of PDXn and PDXr
Description
This is an internal function. Please use cautiously if calling directly. A visualisation of the false positive rate behaviour from the simulations
Usage
plotFalsepositive(data)
Arguments
data |
data frame with four columns which indicate the PDXn, PDXr, Biol_RR and the FPR for a specified go-no go threshold |
Value
a graphic visualisation
Author(s)
Maria Luisa Guerriero, maria.guerriero@astrazeneca.com
Natasha A. Karp, natasha.karp@astrazeneca.com
A function to visualise the sensitivity as a function of PDXn and PDXr
Description
This is an internal function. Please use cautiously if calling directly. A visualisation of the sensitivity from the simulations
Usage
plotSensitivity(data)
Arguments
data |
data frame with four columns which indicate the PDXn, PDXr, Biol_RR and the MissedCalls for a specified go-no go threshold |
Value
a graphic visualisation
Author(s)
Maria Luisa Guerriero, maria.guerriero@astrazeneca.com
Natasha A. Karp, natasha.karp@astrazeneca.com
Function populationPDXdesignApp
Description
Runs the 'shiny' app.
Usage
populationPDXdesignApp()
Author(s)
Maria Luisa Guerriero, maria.guerriero@astrazeneca.com
Natasha A. Karp, natasha.karp@astrazeneca.com
Examples
if (interactive()) {
populationPDXdesignApp()
}
'shiny' app server function
Description
This is an internal function. Please use cautiously if calling directly
Usage
server(input, output, session)
Arguments
input |
input |
output |
output |
session |
session |
Author(s)
Maria Luisa Guerriero, maria.guerriero@astrazeneca.com
Natasha A. Karp, natasha.karp@astrazeneca.com
'shiny' app user interface function
Description
This is an internal function. Please use cautiously if calling directly.
Usage
ui()
Author(s)
Maria Luisa Guerriero, maria.guerriero@astrazeneca.com
Natasha A. Karp, natasha.karp@astrazeneca.com
Function to run simulations to mimic population PDX studies for variety of experimental and biological scenarios
Description
This is an internal function. Please use cautiously if calling directly.
Simulations are used to mimic population PDX studies by inputing a variety of experimental factors (PDXn and PDXr) and biological factors (Biol_RR and C_Acc).
Example usage: varyingPDXnPDXrBiolRR(PDXn_range=c(8,10,12), PDXr_range=c(1,3,5), Biol_RR_range=c(30,40,50), C_Acc=0.95, iterations=500)
Usage
varyingPDXnPDXrBiolRR(PDXn_range, PDXr_range, Biol_RR_range, C_Acc, iterations)
Arguments
PDXn_range |
a vector of PDXn values to study |
PDXr_range |
a vector of PDXr values to study |
Biol_RR_range |
a vector of values between 0 and 100 to indicate the Biol_RR to study |
C_Acc |
the classification accuracy (numeric value between 0 and 1) |
iterations |
iterations |
Value
a dataframe where each row represents the results from a simulation mimicking an individual experiment for a particular design with meta data returned to describe the experimental design
Author(s)
Maria Luisa Guerriero, maria.guerriero@astrazeneca.com
Natasha A. Karp, natasha.karp@astrazeneca.com