knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
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:
# 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")
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)
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()
To follow a tutorial on how to use the package, see vignette("supersigs")
(or type vignette("supersigs")
in R).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.