knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures",
  out.width = "100%"
)

TMEscore

1.Introduction

TME infiltration patterns were determined and systematically correlated with TME cell phenotypes, genomic traits, and patient clinicopathological features to establish the TMEscore: Tumor Microenvironment Characterization in Gastric Cancer Identifies Prognostic and Immunotherapeutically Relevant Gene Signatures.

TMEscore logo

TMEscore is an R package to estimate tumor microenvironment score. Provides functionality to calculate Tumor microenvironment (TME) score using PCA or z-score.

2.Installation

The package is not yet on CRAN. You can install from Github:

# install.packages("devtools")
if (!requireNamespace("TMEscore", quietly = TRUE))
  devtools::install_github("DongqiangZeng0808/TMEscore")

3.Usage

Main documentation is on the tmescore function in the package:

library('TMEscore')
library("ggplot2")
library("patchwork")

Example

tmescore<-tmescore(eset     = eset_stad, #expression data
                   pdata    = pdata_stad, #phenotype data
                   method   = "PCA", #default
                   classify = T) #if true, survival data must be provided in pdata
head(tmescore)
#remove observation with missing value
tmescore<-tmescore[!is.na(tmescore$subtype),]

p<-ggplot(tmescore,aes(x= subtype,y=TMEscore,fill=subtype))+
  geom_boxplot(notch = F,outlier.shape = 1,outlier.size = 0.5)+
  scale_fill_manual(values= c('#374E55FF', '#DF8F44FF', '#00A1D5FF', '#B24745FF'))

comparision<-combn(unique(as.character(tmescore$subtype)), 2, simplify=F)

p1<-p+theme_light()+
    stat_compare_means(comparisons = comparision,size=2.5)+
    stat_compare_means(size=2.5)

# survival analysis
colnames(tmescore)[which(colnames(tmescore)=="TMEscore_binary")]<-"score"
fit<- survfit(Surv(time, status) ~ score, data = tmescore)
p2<-ggsurvplot(fit, 
               conf.int = FALSE,
               palette = c('#374E55FF', '#DF8F44FF'),
               risk.table = TRUE, 
               pval = TRUE,
               risk.table.col = "strata")
p2<-list(p2)
p2 <- arrange_ggsurvplots(p2, print = FALSE, ncol = 1, nrow = 1)

# print plots
(p1|p2)+plot_layout(ncol = 2, widths = c(1,2))

Citation

If you use TMEscore in published research, please cite:

  1. Tumor microenvironment evaluation promotes precise checkpoint immunotherapy of advanced gastric cancer. Journal for ImmunoTherapy of Cancer, 2021, 9(8), e002467. DOI: 10.1136/jitc-2021-002467, PMID: 34376552

  2. Tumor microenvironment characterization in gastric cancer identifies prognostic and imunotherapeutically relevant gene signatures. Cancer Immunology Research, 2019, 7(5), 737-750. DOI: 10.1158/2326-6066.CIR-18-0436, PMID: 30842092

Contact

E-mail any questions to dongqiangzeng0808@gmail.com or interlaken0808@163.com



DongqiangZeng0808/TMEscore documentation built on Feb. 7, 2023, 5:13 a.m.