knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

supersigs

Lifecycle: experimental

supersigs is a companion R package to a method proposed by Afsari, et al. (2021, ELife) to generate mutational signatures from single nucleotide variants in the cancer genome. Note: Package is under active development.

More details on the statistical method can be found in this paper:

Installation

# Install package from Bioconductor
if(!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("supersigs")

You can also install the development version of supersigs from github using the install_github() function from the devtools package.

# Install development version from GitHub
devtools::install_github("TomasettiLab/supersigs")

Data format

At a minimum, the data you will need are the age and mutations for each patient. An example is provided below. (Note that you will need to process the data before running the core functions, see vignette("supersigs") for details.)

library(supersigs)
head(example_dt)

Core functions

In brief, the supersigs package contains three core functions: get_signature, predict_signature, and partial_signature.

get_signature trains a supervised signature for a given factor (e.g. smoking).

supersig <- get_signature(data = data, factor = "smoking", wgs = F)

predict_signature uses the trained supervised signature to obtain predicted probabilities (e.g. probability of smoker) on a new dataset.

pred <- predict_signature(object = supersig, newdata = data, factor = "smoking")

partial_signature removes the contribution of a trained signature from the dataset.

data <- partial_signature(data = data, object = supersig)
devtools::build_readme()

Tutorial

To follow a tutorial on how to use the package, see vignette("supersigs") (or type vignette("supersigs") in R).



TomasettiLab/supersigs documentation built on Dec. 13, 2021, 12:53 a.m.