-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathREADME.Rmd
97 lines (67 loc) · 3.05 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
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 <img src="man/figures/logo.png" align="right" height="139"/>
<!-- badges: start -->
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental) [![CRAN status](https://www.r-pkg.org/badges/version/hacksig)](https://CRAN.R-project.org/package=hacksig) [![Codecov test coverage](https://codecov.io/gh/Acare/hacksig/branch/master/graph/badge.svg)](https://app.codecov.io/gh/Acare/hacksig?branch=master) [![R-CMD-check](https://github.com/Acare/hacksig/workflows/R-CMD-check/badge.svg)](https://github.com/Acare/hacksig/actions)
<!-- badges: end -->
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:
- [CINSARC](https://doi.org/10.1038/nm.2174);
- [ESTIMATE](https://doi.org/10.1038/ncomms3612);
- [Immunophenoscore](https://doi.org/10.1016/j.celrep.2016.12.019);
- [Cytolitic activity](https://doi.org/10.1016/j.cell.2014.12.033);
- and more (use `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*.
## Installation
You can install the last stable version of hacksig from [CRAN](https://CRAN.R-project.org) with:
```{r, eval=FALSE}
install.packages("hacksig")
```
Or the development version from [GitHub](https://github.com/) with:
```{r, eval=FALSE}
# install.packages("devtools")
devtools::install_github("Acare/hacksig")
```
## Usage
You can learn more about usage of the package in `vignette("hacksig")`.
```{r, message=FALSE}
library(hacksig)
library(dplyr)
library(future)
```
### Available signatures
```{r}
get_sig_info()
```
### Check your signatures
```{r}
check_sig(test_expr, signatures = "estimate")
```
### Compute single sample scores
```{r}
hack_sig(test_expr, signatures = c("ifng", "cinsarc"), method = "zscore")
```
### Stratify your samples
```{r}
test_expr %>%
hack_sig("estimate", method = "singscore", direction = "up") %>%
stratify_sig(cutoff = "median")
```
### Speed-up computation time
```{r}
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](https://github.com/Acare/hacksig/issues). Gene-level information about gene signatures are stored in `data-raw/hacksig_signatures.csv` and can be used as a template for requests.