knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) options(tibble.print_min = 5L, tibble.print_max = 5L)
The goal of hacksig
is to provide a simple and tidy interface to compute single sample scores for gene signatures and methods applied in cancer transcriptomics.
Scores can be obtained either for custom lists of genes or for a manually curated collection of gene signatures, including:
get_sig_info()
to get a complete list of the implemented signatures)At present, signature scores can be obtained either with the original publication method or using one of three single sample scoring alternatives, namely: combined z-score, single sample GSEA and singscore.
You can install the last stable version of hacksig from CRAN with:
install.packages("hacksig")
Or the development version from GitHub with:
# install.packages("devtools") devtools::install_github("Acare/hacksig")
You can learn more about usage of the package in vignette("hacksig")
.
library(hacksig) library(dplyr) library(future)
get_sig_info()
check_sig(test_expr, signatures = "estimate")
hack_sig(test_expr, signatures = c("ifng", "cinsarc"), method = "zscore")
test_expr %>% hack_sig("estimate", method = "singscore", direction = "up") %>% stratify_sig(cutoff = "median")
plan(multisession) hack_sig(test_expr, method = "ssgsea")
If you have any suggestions about adding new features or signatures to hacksig
, please create an issue on GitHub. Gene-level information about gene signatures are stored in data-raw/hacksig_signatures.csv
and can be used as a template for requests.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.