ic_deconv: ic_deconv

View source: R/ic_deconv.R

ic_deconvR Documentation

ic_deconv

Description

Estimates immune cell fractions in RNA-seq expression data using the following methods QUANTISEQ, TIMER, MCP_COUNTER, XCELL, EPIC and CIBERSORT. To use the latter, the user need to register on the CIBERSORT web page (https://cibersort.stanford.edu), obtain a license and download the source code in form of two files CIBERSORT.R and LM22.txt. Then, the user need to specify the path to the storage location of such files in the cibersort parameter.

Usage

ic_deconv(
  gene_expression,
  indications = NULL,
  cibersort = NULL,
  tumor = TRUE,
  rmgenes = NULL,
  scale_mrna = TRUE,
  expected_cell_types = NULL
)

Arguments

gene_expression

Output from the ic_raw_to_tpm function. This is a matrix containing expression counts as TPM with HGNC gene symbols as rownames and samples identifiers as colnames.

indications

Character vector of cancer type codes for each sample in the tpm matrix.This is used by TIMER method. Indications supported can be checked using immunedeconv::timer_available_cancers. Default value is NULL.

cibersort

Path to the CIBERSORT.R and LM22.txt files. Default value is NULL.

tumor

Logical value to define if samples are tumors. If so EPIC and quanTIseq use a signature matrix/procedure optimized for tumor samples. Default value is TRUE.

rmgenes

A character vector of gene symbols. Exclude these genes from the analysis. Use this to exclude e.g. noisy genes.

scale_mrna

Logical. If FALSE, disable correction for mRNA content of different cell types. This is supported by methods that compute an absolute score (EPIC and quanTIseq). Default value is TRUE.

expected_cell_types

Limit the analysis to the cell types given in this list. If the cell types present in the sample are known a priori, setting this can improve results for xCell (see https://github.com/grst/immunedeconv/issues/1).

Value

Returns a data frame.

Examples

tpm <- ic_raw_to_tpm(counts = sample_counts,
                     genes_id = 'ensembl_gene_id',
                     biomart = ensembl_biomart_GRCh38_p13)
ic.pred <- ic_deconv(gene_expression = tpm,
                     indications = rep('coad', ncol(tpm)),
                     cibersort = NULL,
                     tumor = TRUE,
                     rmgenes = NULL,
                     scale_mrna = TRUE,
                     expected_cell_types = NULL)

oriolarques/GEGVIC documentation built on Oct. 30, 2024, 10:44 p.m.