Skip to content

Commit

Permalink
added some charts
Browse files Browse the repository at this point in the history
  • Loading branch information
hossainlab committed Feb 9, 2025
1 parent 2257330 commit b2a0696
Show file tree
Hide file tree
Showing 102 changed files with 3,673,791 additions and 516 deletions.
Binary file modified .RData
Binary file not shown.
169 changes: 169 additions & 0 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
# 1.1 Pan-cancer expression analysis
# Load reqquired packages
library(TCGAplot)
library(tidyverse)
gene <- "ITGAX"
col_pal <- "tron"
# 1.1.1 Pan-cancer tumor-normal box plot
pan_boxplot <- pan_boxplot(gene,
palette="jco",
legend="right",
method="wilcox.test") # alternative method "t.test"
pan_boxplot
pan_boxplot(gene,
palette="jco",
legend="right",
method="wilcox.test") # alternative method "t.test"
# 1.1 Pan-cancer expression analysis
# Load reqquired packages
library(TCGAplot)
library(tidyverse)
# Input your gene symbol
gene <- "ITGAX"
col_pal <- "tron"
# 1.1.1 Pan-cancer tumor-normal box plot
pan_boxplot <- pan_boxplot(gene,
palette="jco",
legend="right",
method="wilcox.test") # alternative method "t.test"
pan_boxplot
pan_boxplot(gene,
palette="lancet",
legend="right",
method="wilcox.test") # alternative method "t.test"
pan_boxplot(gene,
palette=col_pal,
legend="right",
method="wilcox.test") # alternative method "t.test"
pan_boxplot(gene,
palette=col_pal,
legend="right",
method="wilcox.test") # alternative method "t.test"
styler:::set_style_transformers()
ggsave(filename = paste0("figures/01_Pan_cancer_tumor_vs_normal_box_plot/", gene, ".png"),
plot = pan_boxplot,
width = 10, height = 6,
dpi = 300)
setwd("I://dataviz-gallery/tcga_workflow")
ggsave(filename = paste0("figures/01_Pan_cancer_tumor_vs_normal_box_plot/", gene, ".png"),
plot = pan_boxplot,
width = 10, height = 6,
dpi = 300)
ggsave(filename = paste0("figures/01_Pan_cancer_tumor_vs_normal_box_plot/", gene, ".png"),
plot = pan_boxplot,
width = 10, height = 6,
dpi = 300)
pan_boxplot(gene,
palette=col_pal,
legend="right",
method="wilcox.test") # alternative method "t.test"
# 1.1.1 Pan-cancer tumor-normal box plot
pan_boxplot <- pan_boxplot(gene,
palette=col_pal,
legend="right",
method="wilcox.test") # alternative method "t.test"
ggsave(filename = paste0("figures/01_Pan_cancer_tumor_vs_normal_box_plot/", gene, ".png"),
plot = pan_boxplot,
width = 10, height = 6,
dpi = 300)
# Input your gene symbol
gene <- "PIK31"
# Input color palette
# scientific journal palettes from ggsci R package,
# e.g.: "npg", "aaas", "lancet","tron", "jama", "jco", "ucscgb", "uchicago", "simpsons" and "rickandmorty".
col_pal <- "lancet"
# 1.1.1 Pan-cancer tumor-normal box plot
pan_boxplot <- pan_boxplot(gene,
palette=col_pal,
legend="right",
method="wilcox.test") # alternative method "t.test"
# Input your gene symbol
gene <- "PIK3R1"
# Input color palette
# scientific journal palettes from ggsci R package,
# e.g.: "npg", "aaas", "lancet","tron", "jama", "jco", "ucscgb", "uchicago", "simpsons" and "rickandmorty".
col_pal <- "lancet"
# 1.1.1 Pan-cancer tumor-normal box plot
pan_boxplot <- pan_boxplot(gene,
palette=col_pal,
legend="right",
method="wilcox.test") # alternative method "t.test"
pan_boxplot
ggsave(filename = paste0("figures/01_Pan_cancer_tumor_vs_normal_box_plot/", gene, ".png"),
plot = pan_boxplot,
width = 10, height = 6,
dpi = 300)
# 1.1.2. Pan-cancer paired tumor-normal box plot
pan_paired_boxplot <- pan_paired_boxplot(gene,
legend = "none",
palette= col_pal)
pan_paired_boxplot
pan_tumor_boxplot <- pan_tumor_boxplot(gene)
pan_tumor_boxplot
# 1.2 Pan-caner correction analysis
# Load required packages
library(TCGAplot)
library(tidyverse)
# Input your gene symbol
gene <- "PIK3R1"
gene_TMB_radar(gene, method = "pearson") #The alternatives to be passed to correlation are "spearman" and "kendall".
gene_MSI_radar(gene,method = "pearson")
gene <- "PIK3R2"
# define color gradients
lowcol <- "#3182bd"
highcol <- "#f03b20"
# 1.2.3.1 Pan-cancer gene expression and ICGs correlation
gene_checkpoint_heatmap <- gene_checkpoint_heatmap(gene,
method="pearson",
lowcol= lowcol,highcol= highcol,
cluster_row=T,cluster_col=T,
legend=T)
gene_chemokine_heatmap(gene,
method="pearson",
lowcol= lowcol,highcol= highcol,
cluster_row=T,cluster_col=T,
legend=T)
library(TCGAplot)
library(tidyverse)
gene <- "WNT11"
immucell_heatmap <-gene_immucell_heatmap(gene,method="pearson",
lowcol="blue",highcol="red",
cluster_row=T,cluster_col=T,legend=T)
# Input your 2nd gene symbol
gene<- "WNT2"
# Input cancer type
cancer <- "BRCA"
ROC <- tcga_roc(cancer,gene)
ROC
# 3.3.1 Gene-gene correlation scatter
# Input your 1st gene symbol
gene1 <- "WNT11"
gene2 <- "WNT7B"
# Input cancer type
cancer <- "BRCA"
gene_gene_scatter(cancer,gene1,gene2,density="T") # whether density of gene expression was shown.
# 2.1.1 Expression analysis grouped by clinical information
library(TCGAplot)
library(tidyverse)
# Input your gene symbol
gene <- "WNT2"
# Input Cancer type
cancer<- "BRCA"
tcga_boxplot(cancer,gene,add = "jitter",
palette="jco",legend="none",
label="p.signif",
method="wilcox.test")
tcga_boxplot <- tcga_boxplot(cancer,gene,add = "jitter",
palette="jco",legend="none",
label="p.signif",
method="wilcox.test")
tcga_boxplot
paired_boxplot(cancer,gene,palette="jco",
legend="none",label="p.signif",
method="wilcox.test")
gene_age(cancer,gene,age=60,
add = "jitter",palette="jco",
legend="none",label="p.signif",method="wilcox.test")
gene_gender(cancer,gene,add = "jitter",
palette="jco",legend="none",
label="p.signif",method="wilcox.test")
2 changes: 1 addition & 1 deletion .Rproj.user/71512E68/pcs/files-pane.pper
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
"ascending": true
}
],
"path": "I://dataviz-gallery"
"path": "I://dataviz-gallery/reproduce-with-r/figures"
}
2 changes: 1 addition & 1 deletion .Rproj.user/71512E68/pcs/windowlayoutstate.pper
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"windowheight": 983
},
"right": {
"splitterpos": 589,
"splitterpos": 731,
"topwindowstate": "NORMAL",
"panelheight": 945,
"windowheight": 983
Expand Down
2 changes: 1 addition & 1 deletion .Rproj.user/71512E68/pcs/workbench-pane.pper
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"TabSet1": 3,
"TabSet1": 4,
"TabSet2": 4,
"TabZoom": {}
}
26 changes: 0 additions & 26 deletions .Rproj.user/71512E68/sources/per/t/1495D86A

This file was deleted.

102 changes: 0 additions & 102 deletions .Rproj.user/71512E68/sources/per/t/1495D86A-contents

This file was deleted.

26 changes: 0 additions & 26 deletions .Rproj.user/71512E68/sources/per/t/176AD07E

This file was deleted.

Loading

0 comments on commit b2a0696

Please sign in to comment.