Skip to contents

Combine signatures and exposures of different models. Exposure values are zero for samples in an annotation where that signature was not predicted

Usage

combine_predict_grid(
  musica,
  modality,
  signature_res,
  model_ids = NULL,
  result_name = "result",
  model_rename = NULL,
  make_copy = FALSE,
  table_name = NULL
)

Arguments

musica

A musica object.

modality

Modality used for prediction.

signature_res

Signatures to automatically subset from for prediction

model_ids

Vector of ids for the models to combine. If null, all models in the modality and result_list entry will be combined. Default NULL.

result_name

Name of the result list entry containing the signatures to plot. Default "result".

model_rename

New model identifier. If null, will be combination of the ids for the models being combined. Deafult NULL.

make_copy

If FALSE, the inputted musica object is updated and nothing is returned. If TRUE, a new musica object is created and returned. Default FALSE.

table_name

Use modality instead

Value

Returns nothing or a new musica object, depending on the make_copy parameter.

Examples

data(musica_annot)
data(cosmic_v2_sigs)
grid <- auto_predict_grid(musica_annot, "SBS96", cosmic_v2_sigs, "lda",
  "Tumor_Subtypes",
  combine_res = FALSE, make_copy = TRUE
)
combined <- combine_predict_grid(grid, "SBS96", cosmic_v2_sigs,
make_copy = TRUE)