get_panels_from_fit function

Extract Panel Details from Group Lasso Fit

Extract Panel Details from Group Lasso Fit

An internal function for analysing a group Lasso fit as part of the predictive model learning procedure, which returns the sets of genes identified by different iterations of the group Lasso algorithm.

get_panels_from_fit(gene_lengths, fit, gene_list, mut_types_list)

Arguments

  • gene_lengths: (dataframe) A table with two columns: Hugo_Symbol and max_cds, providing the lengths of the genes to be modelled.
  • fit: (list) A fit from the group lasso algorithm, produced by the function gglasso (package: gglasso).
  • gene_list: (character) A character vector of genes listing the genes (in order) included in the model pred_fit.
  • mut_types_list: (character) A character vector listing the mutation type groupings (in order) included in the model pred_fit.

Returns

A list of two elements:

  • panel_genes: A matrix where each row corresponds to a gene, each column to an iteration of the group lasso with a different penalty factor, and the elements booleans specifying whether that gene was selected to be included in that iteration.
  • panel_lengths:

Examples

panels <- get_panels_from_fit(example_maf_data$gene_lengths, example_first_pred_tmb$fit, example_gen_model$names$gene_list, mut_types_list = example_gen_model$names$mut_types_list) print(panels$fit)
  • Maintainer: Jacob R. Bradley
  • License: MIT + file LICENSE
  • Last published: 2021-11-15

Useful links