calc_impres: Calculate an IMPRES score

View source: R/calc_impres.R

calc_impresR Documentation

Calculate an IMPRES score

Description

The IMPRES score was created by this study: https://www.nature.com/articles/s41591-018-0157-9. Where melanoma patients on with higher IMPRES scores had better survival when treated with ICI across multiple datasets. A score of 1 means that - out of all of the pairs of genes in ckpt_pair_dt - in only one case was the expression of the first gene higher than the second. 2 means that 2 pairs were higher in the first gene than the second. Etc... NA's in gene expression will be treated as zeroes.

Usage

calc_impres(
  ge_df,
  ckpt_pair_dt = default_ckpt_pairs(),
  gene_element = 1,
  require_all_genes = TRUE,
  sample_key = get_default_sample_key()
)

Arguments

ge_df

Gene expression data.frame or data.table. Each column is a gene, each row is a sample. Must include the sample column indicated by sample_key.

ckpt_pair_dt

optional data frame with user defined gene comparisons

gene_element

For gene names that have a pipe in them, which position should be used ("1|2 etc"). Integer.

require_all_genes

Boolean to indicate if the function should proceed if some genes are missing.

sample_key

Character string to specify the column that is the sample key.

id_list

List of all sample IDs, list order matches row order in gene expression matrix

Value

Returns data frame/table with 2 columns: sample ID & IMPRES score


Benjamin-Vincent-Lab/binfotron documentation built on Oct. 1, 2024, 8:33 p.m.