SkillAgentSearch skills...

TCGAplot

A number of functions were generated to perform pan-cancer DEG analysis, correlation analysis between gene expression and TMB, MSI, TIME, and promoter methylation. Methods for visualization were provided in order to easily perform integrative pan-cancer multi-omics analysis.

Install / Use

/learn @tjhwangxiong/TCGAplot
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

TCGAplot (v8.0.0)

(DO NOT INSTALL USING "devtools", PLEASE download the .zip file and install the package locally)

author: Xiong Wang

email: wangxiong@tjh.tjmu.edu.cn or wangxiong@hust.edu.cn

affiliation: Department of Laboratory Medicine, Tongji Hospital, Tongji Medical College, Huazhong University of Science and Technology, Wuhan 430030, China.

1. Introduction

Pan-cancer analysis aimed to examine the commonalities and heterogeneity among the genomic and cellular alterations across diverse types of tumors. Pan-cancer analysis of gene expression, tumor mutational burden (TMB), microsatellite instability (MSI), and tumor immune microenvironment (TIME) became available based on the exome, transcriptome, and DNA methylome data from TCGA. Some online tools provided user-friendly analysis of gene and protein expression, mutation, methylation, and survival for TCGA data, such as GEPIA 2 (http://gepia2.cancer-pku.cn/#index), cBioPortal (http://www.cbioportal.org/), UALCAN (https://ualcan.path.uab.edu/index.html), and MethSurv (https://biit.cs.ut.ee/methsurv/). However, these online tools were either uni-functional or not able to perform analysis of user-defined functions. Therefore, TCGA pan-cancer multi-omics data were integrated and included in this package, including gene expression TPM (transcripts per million) matrix, TMB, MSI, immune cell ratio, immune score, promoter methylation, and clinical information. A number of functions were generated to perform pan-cancer paired/unpaired differential gene expression analysis, pan-cancer correlation analysis between gene expression and TMB, MSI, immune cell ratio, immune score,immune stimulator,immune inhibitor, and promoter methylation. Methods for visualization were provided, including paired/unpaired boxplot, survival plot, ROC curve, heatmap, scatter, radar chart, and forest plot,in order to easily perform integrative pan-cancer multi-omics analysis. Finally, these built-in data could be extracted and analyzed with user-defined functions, making the pan-cancer analysis much more convenient.

2. Installation

2.1 For Windows System

To install this package for Windows system, download TCGAplot R package at https://github.com/tjhwangxiong/TCGAplot/releases/download/v8.0.0/TCGAplot_8.0.0.zip </br>

and install locally.

install </br>

2.2 For Mac System

Download TCGAplot from the link: https://drive.google.com/drive/folders/1CU95aGXMW6P8FrxPaJU7F6WBRE9NigVy?usp=drive_link

Run

install.packages(c("devtools", "usethis", "roxygen2"))
devtools::build()

Then, install the TCGAplot locally as the mentioned method for Windows system.

There were several dependent R packages, and users could install these dependent R packages using the following codes before the installation of TCGAplot.

if(!require("BiocManager")) install.packages("BiocManager",update = F,ask = F)

cran_packages=c("magrittr",
                "dplyr",
                "tibble",
                "ggpubr",
                "stringr",
                "reshape2",
                "psych",
                "limma",
                "circlize",
                "grid",
                "fmsb",
                "survival",
                "survminer",
                "forestplot",
                "pROC",
                "tinyarray",
                "ggplot2",
                "patchwork",
                "ggsci",
                "RColorBrewer",
                "pheatmap")

Biocductor_packages=c("edgeR",
                      "org.Hs.eg.db",
                      "clusterProfiler",
                      "enrichplot",
                      "ComplexHeatmap",
                      "GSVA")

# install packages in CRAN
for (pkg in cran_packages){
  if (!require(pkg,character.only=T)){
    install.packages(pkg,ask = F,update = F)
    require(pkg,character.only=T) 
  }
}

# install packages in Biocductor
for (pkg in Biocductor_packages){
  if (!require(pkg,character.only=T)) {
    BiocManager::install(pkg,ask = F,update = F)
    require(pkg,character.only=T) 
  }
}

3. Pan-cancer analysis

3.1 Pan-cancer expression analysis

3.1.1 Pan-cancer tumor-normal boxplot

pan_boxplot

Create a pan-cancer box plot for a single gene with symbols indicating statistical significance.

pan_boxplot(gene,palette="jco",legend="right",method="wilcox.test")

Arguments

gene

gene name likes "KLF7".

palette

the color palette to be used for filling by groups. Allowed values include scientific journal palettes from ggsci R package, e.g.: "npg", "aaas", "lancet", "jco", "ucscgb", "uchicago", "simpsons" and "rickandmorty".

legend

legend position. Allowed values include "top","bottom","left","right" and "none".

method

a character string indicating which method to be used for comparing means including "wilcox.text" and "t.test". method="wilcox.test" is default.

Example

pan_boxplot("KLF7")

Pan-cancer box plot of KLF7

3.1.2 Pan-cancer paired tumor-normal boxplot

pan_paired_boxplot

Create a pan-cancer paired box plot for a single gene with symbols indicating statistical significance.

pan_paired_boxplot(gene,palette="jco",legend="right",method="wilcox.test")

Arguments

gene

gene name likes "KLF7".

palette

the color palette to be used for filling by groups. Allowed values include scientific journal palettes from ggsci R package, e.g.: "npg", "aaas", "lancet", "jco", "ucscgb", "uchicago", "simpsons" and "rickandmorty".

legend

legend position. Allowed values include "top","bottom","left","right" and "none".

method

a character string indicating which method to be used for comparing means including "wilcox.text" and "t.test". method="wilcox.test" is default.

Example

pan_paired_boxplot("KLF7",legend = "none")

Pan-cancer paired box plot of KLF7

3.1.3 Pan-tumor boxplot

pan_tumor_boxplot

Create a pan-cancer box plot for a single gene in tumor samples.

pan_tumor_boxplot(gene)

Arguments

gene

gene name likes "KLF7".

Example

pan_tumor_boxplot("KLF7")

Pan-cancer paired box plot of KLF7

3.2 Pan-cancer correlation analysis

3.2.1 Pan-cancer gene expression and TMB correlation radar chart

gene_TMB_radar

Create a pan-cancer radar chart for gene expression and TMB correlation.

gene_TMB_radar(gene,method = "pearson")

Arguments

gene

gene name likes "KLF7".

method

method="pearson" is the default value. The alternatives to be passed to correlation are "spearman" and "kendall".

Example

gene_TMB_radar("KLF7")

KLF7 and TMB correlation

3.2.2 Pan-cancer gene expression and MSI correlation radar chart

gene_MSI_radar

Create a pan-cancer radar chart for gene expression and MSI correlation.

gene_MSI_radar(gene,method = "pearson")

Arguments

gene gene name likes "KLF7".

method

method="pearson" is the default value. The alternatives to be passed to correlation are "spearman" and "kendall".

Example

gene_MSI_radar("KLF7")

KLF7 and MSI correlation

3.2.3 Pan-cancer gene expression and immune-related genes correlation

3.2.3.1 Pan-cancer gene expression and ICGs correlation

gene_checkpoint_heatmap

Create a pan-cancer heatmap with symbols indicating statistical significance to reveal the correlation between the expression of a single gene and ICGs (immune checkpoint genes).

ICGs geneset included "CD274","CTLA4","HAVCR2","LAG3","PDCD1","PDCD1LG2","SIGLEC15",and "TIGIT".

gene_checkpoint_heatmap(gene,method="pearson",lowcol="blue",highcol="red",cluster_row=T,cluster_col=T,legend=T)

Arguments

gene

gene name likes "KLF7".

method

method="pearson" is the default value. The alternatives to be passed to correlation are "spearman" and "kendall".

lowcol

color for low point.

highcol

color for high point.

cluster_row

boolean values determining if rows should be clustered or hclust object.

cluster_col

boolean values determining if columns should be clustered or hclust object.

legend

logical to determine if legend should be drawn or not.

Example

gene_checkpoint_heatmap("KLF7")

KLF7 and ICGs correlation

3.2.3.2 Pan-cancer gene expression and chemokine correlation

gene_chemokine_heatmap

Create a pan-cancer heatmap with symbols indicating statistical significance to reveal the correlation between the expression of a single gene and chemokine.

Chemokine geneset included "CCL1","CCL2","CCL3","CCL4","CCL5","CCL7","CCL8","CCL11","CCL13","CCL14","CCL15","CCL16","CCL17","CCL18","CCL19","CCL20","CCL21","CCL22","CCL23","CCL24","CCL25","CCL26","CCL28","CX3CL1","CXCL1","CXCL2","CXCL3","CXCL5","CXCL6","CXCL8","CXCL9","CXCL10","CXCL11","CXCL12","CXCL13","CXCL14","CXCL16", and "CXCL17".

gene_chemokine_heatmap(gene,method="pearson",lowcol="blue",highcol="red",cluster_row=T,cluster_col=T,legend=T)

Arguments

gene

gene name likes "KLF7".

method

method="pearson" is the default value. The alternatives to be passed to correlation are "spearman" and "kendall".

lowcol

color for low point.

Related Skills

View on GitHub
GitHub Stars126
CategoryDevelopment
Updated18d ago
Forks21

Languages

R

Security Score

80/100

Audited on Mar 12, 2026

No findings