dot-computeZIPdelta: Vector-based version of computeZIPdelta

.computeZIPdeltaR Documentation

Vector-based version of computeZIPdelta

Description

Following the calculation of ZIP delta score as in Appendix A3. See reference for details.

Usage

.computeZIPdelta(
  treatment1id,
  treatment2id,
  treatment1dose,
  treatment2dose,
  sampleid,
  HS_1,
  HS_2,
  EC50_1,
  EC50_2,
  E_inf_1,
  E_inf_2,
  combo_viability,
  ZIP = NULL,
  residual = "logcosh",
  nthread = 1L,
  show_Rsqr = FALSE
)

Arguments

treatment1id

character a vector of identifiers for treatment 1

treatment2id

character a vector of identifiers for treatment 2

treatment1dose

numeric a vector of concentrations for treatment 1

treatment2dose

numeric a vector of concentrations for treatment 2

sampleid

character Cell-line ID of a drug combination screening experiment.

HS_1

numeric Hill coefficient of treatment 1

HS_2

numeric Hill coefficient of treatment 2

EC50_1

numeric relative EC50 of treatment 1.

EC50_2

numeric relative EC50 of treatment 2.

E_inf_1

numeric viability produced by the maximum attainable effect of treatment 1.

E_inf_2

numeric viability produced by the maximum attainable effect of treatment 2.

combo_viability

numeric observed viability of the two treatments combined.

ZIP

numeric pre-computed ZIP reference values. If not provided, it will be computed during delta score calculation.

residual

character Method used to minimise residual in fitting curves. 3 methods available: c("logcosh", "normal", "Cauchy"). The default method is logcosh. It minimises the logarithmic hyperbolic cosine loss of the residuals and provides the fastest estimation among the three methods, with fitting quality in between normal and Cauchy; recommanded when fitting large-scale datasets. The other two methods minimise residuals by considering the truncated probability distribution (as in their names) for the residual. Cauchy provides the best fitting quality but also takes the longest to run.

nthread

integer Number of cores used to perform computation. Default 1.

show_Rsqr

logical Whether to show the 2-way curve fitting quality in the result. Default FALSE.

Value

numeric delta scores of every dose combinations for any given treatment combinations.

References

Yadav, B., Wennerberg, K., Aittokallio, T., & Tang, J. (2015). Searching for Drug Synergy in Complex Dose–Response Landscapes Using an Interaction Potency Model. Computational and Structural Biotechnology Journal, 13, 504–513. https://doi.org/10.1016/j.csbj.2015.09.001

Examples

## Not run: 
## ZIP is optional. Will be recomputed if not provided.
combo_profiles <- CoreGx::buildComboProfiles(
     tre, 
     c("HS", "EC50", "E_inf", "ZIP", "combo_viability"))
combo_profiles[,
        .computeZIPdelta(
            treatment1id = treatment1id,
            treatment2id = treatment2id,
            treatment1dose = treatment1dose,
            treatment2dose = treatment2dose,
            sampleid = sampleid,
            HS_1 = HS_1, HS_2 = HS_2,
            EC50_1 = EC50_1, EC50_2 = EC50_2,
            E_inf_1 = E_inf_1, E_inf_2 = E_inf_2,
            combo_viability = combo_viability,
            ZIP = ZIP,
            nthread = 4,
            show_Rsqr = TRUE
        )
    ] -> delta_scores

## End(Not run)


bhklab/PharmacoGx documentation built on April 18, 2024, 3:13 a.m.