pred_first_fit: First-Fit Predicitve Model with Group Lasso

Description Usage Arguments Value Examples

Description

This function implements the first-fit procedure described in Bradley and Cannings, 2021. It requires at least a generative model and a dataframe containing gene lengths as input.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
pred_first_fit(
  gen_model,
  lambda = exp(seq(-16, -24, length.out = 100)),
  biomarker = "TMB",
  marker_mut_types = c("NS", "I"),
  training_matrix,
  gene_lengths,
  marker_training_values = NULL,
  K_method = max,
  free_genes = c()
)

Arguments

gen_model

(list) A generative mutation model, fitted by fit_gen_model().

lambda

(numeric) A vector of penalisation weights for input to the group lasso optimiser gglasso.

biomarker

(character) The biomarker in question. If "TMB" or "TIB", then automatically defines the subsequent variable marker_mut_types.

marker_mut_types

(character) The set of mutation type groupings constituting the biomarker being estimated. Should be a vector comprising of elements of the mut_types_list vector in the 'names' attribute of gen_model.

training_matrix

(sparse matrix) A sparse matrix of mutations in the training dataset, produced by get_mutation_tables().

gene_lengths

(dataframe) A table with two columns: Hugo_Symbol and max_cds, providing the lengths of the genes to be modelled.

marker_training_values

(dataframe) A dataframe containing two columns: 'Tumor_Sample_Barcode', containing the sample IDs for the training dataset, and a second column containing training values for the biomarker in question.

K_method

(function) How to select a representative biomarker value from the training dataset. Defaults to max().

free_genes

(character) Which genes should escape penalisation (for example when augmenting a pre-existing panel).

Value

A list of six elements:

Examples

1
2
3
example_first_fit <- pred_first_fit(example_gen_model, lambda = exp(seq(-9, -14, length.out = 100)),
                                    training_matrix = example_tables$train$matrix,
                                    gene_lengths = example_maf_data$gene_lengths)

ICBioMark documentation built on Nov. 15, 2021, 5:09 p.m.