get_p {ICBioMark}R Documentation

Construct Optimisation Parameters.

Description

An internal function. From the learned generative model and training data, produces a vector of weights p to be used in the subsequent group lasso optimisation, alongside a biomarker-dependent normalisation quantity p_norm.

Usage

get_p(gen_model, training_matrix, marker_mut_types, gene_lengths)

Arguments

gen_model

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

training_matrix

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

marker_mut_types

(character) A character vector listing which mutation types (of the set specified in the generative model attribute 'names') constitute the biomarker in question.

gene_lengths

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

Value

A list with three entries:

Examples

p <- get_p(example_gen_model, example_tables$train$matrix,
           marker_mut_types = c("I"), gene_lengths = example_maf_data$gene_lengths)
print(p$p[1:5])
print(p$p_norm)
print(p$bc[1:5])

[Package ICBioMark version 0.1.4 Index]