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

hacksig

Lifecycle: experimental CRAN status Codecov test coverage R-CMD-check

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:

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.

Installation

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")

Usage

You can learn more about usage of the package in vignette("hacksig").

library(hacksig)
library(dplyr)
library(future)

Available signatures

get_sig_info()

Check your signatures

check_sig(test_expr, signatures = "estimate")

Compute single sample scores

hack_sig(test_expr, signatures = c("ifng", "cinsarc"), method = "zscore")

Stratify your samples

test_expr %>% 
    hack_sig("estimate", method = "singscore", direction = "up") %>% 
    stratify_sig(cutoff = "median")

Speed-up computation time

plan(multisession)
hack_sig(test_expr, method = "ssgsea")

Contributing

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.



Acare/hacksig documentation built on April 14, 2025, 6:18 a.m.