Skip to contents

Compute Bliss and HSA synergy scores for a combination SE, replicating the exact scoring logic of fit_SE.combinations.

Usage

apply_combo_scores(
  se,
  scores_assay = "scores",
  averaged_assay = "Averaged",
  metrics_assay = "Metrics",
  excess_assay = NULL,
  normalization_types = c("GR", "RV"),
  fit_source = "gDR",
  score_FUN = calculate_score
)

Arguments

se

SummarizedExperiment with "Averaged" and "Metrics" assays (combination experiment).

scores_assay

string; name of the output assay to write scores into. Default "scores".

averaged_assay

string; name of the input assay. Default "Averaged".

metrics_assay

string; name of the assay containing SA fit parameters. Default "Metrics".

excess_assay

string or NULL; if the SE already contains a pre-computed excess assay (e.g. from apply_combo_excess), pass its name here to skip excess re-computation and score directly from it. Default NULL (excess is computed internally).

normalization_types

character vector of normalization types to process. Default c("GR", "RV").

fit_source

string recorded in the fit_source column. Default "gDR".

score_FUN

function to reduce per-point excess values to a scalar score. Default calculate_score (mean of top 10-percentile).

Value

Updated SummarizedExperiment with a scores_assay assay containing bliss_score and hsa_score per triplet.

Details

Unlike the low-level bliss_fit_fn and hss_fit_fn (which work on raw Averaged data per triplet), this function uses the SA fit parameters from the Metrics assay to generate curve-smoothed single-agent responses via predict_efficacy_from_conc before computing excess. This produces results numerically identical to fit_SE.combinations.

The function requires a Metrics assay containing columns dilution_drug, cotrt_value, ec50, h, x_inf, x_0, and normalization_type — as produced by fit_SE.combinations or apply_fit_to_se with fit_drug_response_metrics.

Scoring steps (per drug-combo × cell-line × normalization_type):

  1. Predict smooth SA responses at every combo concentration using predict_efficacy_from_conc on drug_1 and drug_2 parameter sets from Metrics.

  2. Average col_values (drug-1-along-conc1) and row_values (drug-2-along-conc2) → smooth.

  3. Compute Bliss-expected using calculate_Bliss and HSA-expected using calculate_HSA on the smooth SA edges.

  4. Compute excess via calculate_excess.

  5. Score = mean of top 10-percentile excess via calculate_score.

See also

bliss_fit_fn, hss_fit_fn for the simplified raw-data variants.

Examples

mae <- gDRutils::get_synthetic_data("finalMAE_combo_matrix_small")
combo_se <- mae[[gDRutils::get_supported_experiments("combo")]]
combo_se_out <- apply_combo_scores(combo_se)
"scores" %in% SummarizedExperiment::assayNames(combo_se_out)
#> [1] TRUE