fit_gen_model_unisamp: Fit Generative Model Without Sample-Specific Effects

Description Usage Arguments Value Examples

View source: R/gen_model.R

Description

A function to fit a generative model to a mutation dataset that does not incorporate sample-specific effects. Otherwise acts similarly to the function fit_gen_model().

NOTE: fits produced by this model will not be compatible with predictive model fits downstream - it is purely for comparing with full models.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
fit_gen_model_unisamp(
  gene_lengths,
  matrix = NULL,
  sample_list = NULL,
  gene_list = NULL,
  mut_types_list = NULL,
  col_names = NULL,
  table = NULL,
  nlambda = 100,
  n_folds = 10,
  maxit = 1e+09,
  seed_id = 1234,
  progress = FALSE
)

Arguments

gene_lengths

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

matrix

(Matrix::sparseMatrix) A mutation matrix, such as produced by the function get_table_from_maf().

sample_list

(character) The set of samples to be modelled.

gene_list

(character) The set of genes to be modelled.

mut_types_list

(character) The set of mutation types to be modelled.

col_names

(character) The column names of the 'matrix' parameter.

table

(list) Optional parameter combining matrix, sample_list, gene_list, mut_types_list, col_names, as is produced by the function get_tables().

nlambda

(numeric) The length of the vector of penalty weights, passed to the function glmnet::glmnet().

n_folds

(numeric) The number of cross-validation folds to employ.

maxit

(numeric) Technical parameter passed to the function glmnet::glmnet().

seed_id

(numeric) Input value for the function set.seed().

progress

(logical) Show progress bars and text.

Value

A list comprising three objects:

Examples

1
2
3
example_gen_model_unisamp <- fit_gen_model_unisamp(example_maf_data$gene_lengths,
                                                   table = example_tables$train)
print(names(example_gen_model))

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