Learn R Programming

⚠️There's a newer version (2.0.3) of this package.Take me there.

immunedeconv - an R package for unified access to computational methods for estimating immune cell fractions from bulk RNA sequencing data.

Basic usage

immunedeconv::deconvolute(gene_expression_matrix, "quantiseq")

where gene_expression_matrix is a matrix with genes in rows and samples in columns. The rownames must be HGNC symbols and the colnames must be sample names. The method can be one of

quantiseq
timer
cibersort
cibersort_abs
mcp_counter
xcell
epic

For more detailed usage instructions, see the Documentation.

Available methods

methodcitation
quanTIseqFinotello, F., Mayer, C., Plattner, C., Laschober, G., Rieder, D., Hackl, H., … Trajanoski, Z. (2017). quanTIseq: quantifying immune contexture of human tumors. BioRxiv, 223180. https://doi.org/10.1101/223180
TIMERLi, B., Severson, E., Pignon, J.-C., Zhao, H., Li, T., Novak, J., … Liu, X. S. (2016). Comprehensive analyses of tumor immunity: implications for cancer immunotherapy. Genome Biology, 17(1), 174. https://doi.org/10.1186/s13059-016-1028-7
CIBERSORTNewman, A. M., Liu, C. L., Green, M. R., Gentles, A. J., Feng, W., Xu, Y., … Alizadeh, A. A. (2015). Robust enumeration of cell subsets from tissue expression profiles. Nature Methods, 12(5), 453–457. https://doi.org/10.1038/nmeth.3337
MCPCounterBecht, E., Giraldo, N. A., Lacroix, L., Buttard, B., Elarouci, N., Petitprez, F., … de Reyniès, A. (2016). Estimating the population abundance of tissue-infiltrating immune and stromal cell populations using gene expression. Genome Biology, 17(1), 218. https://doi.org/10.1186/s13059-016-1070-5
xCellAran, D., Hu, Z., & Butte, A. J. (2017). xCell: digitally portraying the tissue cellular heterogeneity landscape. Genome Biology, 18(1), 220. https://doi.org/10.1186/s13059-017-1349-1
EPICRacle, J., de Jonge, K., Baumgaertner, P., Speiser, D. E., & Gfeller, D. (2017). Simultaneous enumeration of cancer and immune cell types from bulk tumor gene expression data. ELife, 6, e26476. https://doi.org/10.7554/eLife.26476

Comparison of the methods

For a benchmark comparison of the methods, please see our publication. If you would like to benchmark additional methods, please see our benchmark pipeline.

Installation

Conda

The easiest way to retrieve this package and all its dependencies is to use Anaconda.

  1. Download Miniconda, if you don't have a conda installation already.

  2. Create an environment for deconvolution: conda create -n deconvolution

  3. Activate the environment conda activate deconvolution

  4. Add additional Anaconda channels:

conda config --add channels r
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --add channels grst
  1. Install the immunedeconv package
conda install -c grst r-immunedeconv

conda will automatically install the package and all dependencies. You can then open an R instance within the environment and use the package.

Standard R Package

You can also install immunedeconv as a regular R package in your default R installation. You need install the following non-CRAN dependencies. If you use a very recent version of devtools, it will also resolve these dependencies automatically.

Bioconductor

source("https://bioconductor.org/biocLite.R")
biocLite("proprocessCore")
biocLite("Biobase")
biocLite("GSVA")
biocLite("sva")
biocLite("GSEABase")

GitHub

library(devtools)
install_github('dviranran/xCell')
install_github('GfellerLab/EPIC')
install_github('ebecht/MCPcounter/Source')

Finally, install the immunedeconv package itself by running

devtools::install_github('grst/immune_deconvolution_methods')

Citation

If you use this package, please cite

Sturm, G. and Aneichyk, T. "Benchmarking methods for estimating immune cell abundance from bulk RNA-sequencing data", manuscript in preparation

Copy Link

Version

Version

0.1.1

License

CC-BY-4.0

Issues

Pull Requests

Stars

Forks

Maintainer

Gregor Sturm

Last Published

August 4th, 2021

Functions in immunedeconv (0.1.1)

example_gene_expression_matrix

example gene expression dataset
find_children

recursively traverse the cell type tree to resolve the mapping.
timer

Source code for the TIMER deconvolution method.
eset_to_matrix

Convert a Biobase::ExpressionSet to a gene-expression matrix.
deconvolution_methods

List of supported immune deconvolution methods
make_random_bulk

Make a random bulk sample from a single-cell dataset
timer_available_cancers

TIMER signatures are cancer specific. This is the list of available cancer types.
map_result_to_celltypes

Map a result table as generated by deconvolute to a user-defined list of cell types.
map_cell_types

Use a tree-hierarchy to map cell types among different methods.
xCell.data

Data object from xCell.
set_cibersort_mat

Set Path to CIBERSORT matrix file (LM22.txt)
quantiseq_helper

Helper functions for quanTIseq
single_cell_simulation

Functions for generating simulated bulk samples from a single cell dataset.
deconvolute

Perform an immune cell deconvolution on a dataset.
set_cibersort_binary

Set Path to CIBERSORT R script (CIBERSORT.R)
immune_deconvolution_methods

Collection of immune cell deconvolution methods.
make_bulk_eset

Make a random expression set from a single-cell dataset
scale_to_million

Scale sample to TPM
cell_type_tree

Available cell types in the controlled vocabulary organized as a lineage tree.
check_cancer_types

process batch table and check cancer types.
deconvolute_timer

Deconvolute using the TIMER technique
cell_type_mapping

Functions for mapping cell types between deconvolution methods and datasets.
annotate_cell_type

Annotate unified cell_type names
GetFractions.Abbas

Constrained regression method implemented in Abbas et al., 2009
deconvolute_quantiseq.default

Use quanTIseq to deconvolute a gene expression matrix.
available_datasets

Available methods and datasets.
cell_type_map

Table mapping the cell types from methods/datasets to a single, controlled vocabulary.