-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2257330
commit b2a0696
Showing
102 changed files
with
3,673,791 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,5 +5,5 @@ | |
"ascending": true | ||
} | ||
], | ||
"path": "I://dataviz-gallery" | ||
"path": "I://dataviz-gallery/reproduce-with-r/figures" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"TabSet1": 3, | ||
"TabSet1": 4, | ||
"TabSet2": 4, | ||
"TabZoom": {} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.