get_signature {supersigs} | R Documentation

## Function to obtain a SuperSig

### Description

Generate a tissue-specific SuperSig for a given dataset of mutations and exposure factor. Returns the SuperSig and a classification model trained with the SuperSig.

### Usage

    get_signature(data, factor, wgs = FALSE)

### Arguments

`data` | a data frame of mutations containing columns for `sample_id`, `age`, `IndVar`, and the 96 trinucleotide mutations (see vignette for details)
`factor` | the factor/exposure (e.g. "age", "smoking"). If the factor = "age", the SuperSig is computed using counts. Otherwise, rates (counts/age) are used.
`wgs` | logical value indicating whether sequencing data is whole-genome (wgs = `TRUE`) or whole-exome (wgs = `FALSE`)

### Value

`get_signature` returns an object of class `SuperSig`

### Examples

    head(example_dt) # use example data from package
    input_dt <- make_matrix(example_dt) # convert to correct format
    input_dt$IndVar <- c(1, 1, 1, 0, 0) # add IndVar column
    get_signature(data = input_dt, factor = "Age") # get SuperSig

[Package supersigs version 1.0.0 Index]