siglasso: Attributing signatures using sigLASSO

View source: R/siglasso.R

siglassoR Documentation

Attributing signatures using sigLASSO

Description

Given a mutation spectrum of one or more sample, assign signatures with weights.

Usage

siglasso(
  sample_spectrum,
  signature,
  conf = 0.1,
  prior,
  adaptive = T,
  gamma = 1,
  alpha_min = 400,
  iter_max = Inf,
  sd_multiplier = 1,
  elastic_net = F,
  plot = T,
  plot_colors = NA,
  plot_orders = NULL,
  reorder = F,
  normalize = "none",
  default_sig = "cosmic_v2"
)

Arguments

sample_spectrum

A data.frame/matrix of mutation counts catelogued by context

signature

A signature matrix, in the form of possibilities of mutations. If not supplied, it loads 30 COSMIC signatures

conf

Confidence factor of the mutational fitting (default: 0.1)

prior

A vector of vector of weights on different signatures. (default: a vector of 1s (flat prior)).

adaptive

A boolean variable indicating whether adaptive lasso should be used

gamma

The hyperparameter gamma in adapative lasso. We find it is not sensitive to the analysis (default: 1)

alpha_min

The minimal alpha value (default:400)

iter_max

Maximum iterations (default: Inf)

sd_multiplier

cut-off for lambda tuning; how many sd it tolerates from min MSE (default: 1.0).

elastic_net

Boolean variable indicating whether elastic net should be used

plot

Boolean variable; if it should barplot the results

plot_colors

You can supply your own colors here (need to equal the number of signatures), or by default the program will assign colors.

plot_orders

How to reorder when plotting. It can be supplied as NULL, that is no reorder, or reordering by the sum of signature assignment (see reorder) or a vector, indicating the orders (default: NULL)

reorder

Boolean variable indicating whether reorder when plotting or not. (default: False)

normalize

Whethere to normalize the signatures before fitting. "none", "genome" or "exome". default: "none" (also recommended for COSMIC signatures). Note here because normalized mutation counts will be not discrete anymore. We applied the normalization on the signature. They are mathmatically equivalent.

default_sig

Default signature type if no signatures were supplied; three choices available so far, "cosmic_v2" (default) or "cosmic_v3_exo", "cosmic_v3_wholegenome"

Value

A data.frame of weights of all signatures


gersteinlab/siglasso documentation built on Sept. 5, 2022, 8:45 p.m.