本教程原文:跟着NC学作图 | TCGA VS EMT500数据集评分比较
文章
Genomic and microenvironmental heterogeneity shaping epithelial-to-mesenchymal trajectories in cancer
「数据代码:」https://github.com/secrierlab/EMT
摘要
上皮-间充质转化(EMT)是癌症进展的关键细胞过程,具有多种中间状态,其分子特征仍然不明显。为了填补这一空白,我们提出了一种基于转录组信号强有力地评估个体肿瘤中 EMT 转化的方法。我们应用这种方法来探索7180个上皮起源肿瘤的 EMT 轨迹,并鉴定具有预后和治疗价值的三种宏观状态,归因于上皮,杂交 E/M 和间充质表型。我们表明,杂种状态是相对稳定的,并与增加的非整倍体有关。我们进一步利用空间转录组学和单细胞数据集来探索 EMT 转化的空间异质性,以及肿瘤微环境中与细胞毒性、 NK 细胞和成纤维细胞的不同相互作用模式。此外,我们提供了一个基因组事件的目录潜在的不同进化约束的 EMT 转化。这项研究揭示了 EMT 病程中不同阶段的病因,并强调了形成原发性肿瘤间充质转化的更广泛的基因组和环境标志。
图形绘制
导入数据
数据的前期准备,大家可以自己去论文中的查找,教程中不展开说明。教程的主要目的「是提供大家绘制类似图形的代码」。
input_cp_final2 <- read.table("HighConf_pseudotime_withEMT.txt",header = T)
head(input_cp_final2)
patients tumors mock_pseudospace tgfb_pseudospace EMT_scores
ACC.TCGA.OR.A5J1.01A.11R.A29S.07 ACC 52.3901898499394 42.4277905190899 1.23229228944451
ACC.TCGA.OR.A5J2.01A.11R.A29S.07 ACC 58.2219383281126 52.1312432022196 1.49097707952493
ACC.TCGA.OR.A5J3.01A.11R.A29S.07 ACC 51.5891775929671 41.0837306018038 1.36483064051018
ACC.TCGA.OR.A5J5.01A.11R.A29S.07 ACC 51.963211277127 46.4675216826843 1.79346466983594
ACC.TCGA.OR.A5J6.01A.31R.A29S.07 ACC 48.4272123781731 47.6193563695876 0.883014008020216
ACC.TCGA.OR.A5J7.01A.11R.A29S.07 ACC 62.4042554219295 88.0026656237261 1.10932266858008
ACC.TCGA.OR.A5J8.01A.11R.A29S.07 ACC 63.01585481594 58.0195945444141 2.73551973326235
ACC.TCGA.OR.A5J9.01A.11R.A29S.07 ACC 57.4298354766427 56.3298507121662 1.79610641797267
ACC.TCGA.OR.A5JA.01A.11R.A29S.07 ACC 60.0455600490082 70.6751155732968 1.48756584540459
ACC.TCGA.OR.A5JB.01A.11R.A29S.07 ACC 65.6103767426594 84.6863428316355 1.84836941118404
数据处理
input_cp_final2$new_ann<-rep("no",nrow(input_cp_final2))
## 分类
input_cp_final2$new_ann[grep(input_cp_final2$patients,pattern="TCGA")]<-"TCGA"
input_cp_final2$new_ann[grep(input_cp_final2$patients,pattern="TCGA",invert=T)]<-"MET500"
input_cp_final2$new_ann<-as.factor(input_cp_final2$new_ann)
patients tumors mock_pseudospace tgfb_pseudospace EMT_scores new_ann
1 ACC.TCGA.OR.A5J1.01A.11R.A29S.07 ACC 52.39019 42.42779 1.232292 TCGA
2 ACC.TCGA.OR.A5J2.01A.11R.A29S.07 ACC 58.22194 52.13124 1.490977 TCGA
3 ACC.TCGA.OR.A5J3.01A.11R.A29S.07 ACC 51.58918 41.08373 1.364831 TCGA
4 ACC.TCGA.OR.A5J5.01A.11R.A29S.07 ACC 51.96321 46.46752 1.793465 TCGA
5 ACC.TCGA.OR.A5J6.01A.31R.A29S.07 ACC 48.42721 47.61936 0.883014 TCGA
6 ACC.TCGA.OR.A5J7.01A.11R.A29S.07 ACC 62.40426 88.00267 1.109323 TCGA
High与Low分类
input_cp_final2$emt_status<-ifelse(input_cp_final2$EMT_scores>0,"High_EMT","Low_EMT")
summary(input_cp_final2$mock_pseudospace)
input_cp_final2$pseudospace_status<-ifelse(input_cp_final2$mock_pseudospace<=50,"Late_Pseudotime","Early_Pseudotime")
patients tumors mock_pseudospace tgfb_pseudospace EMT_scores new_ann emt_status
1 ACC.TCGA.OR.A5J1.01A.11R.A29S.07 ACC 52.39019 42.42779 1.232292 TCGA High_EMT
2 ACC.TCGA.OR.A5J2.01A.11R.A29S.07 ACC 58.22194 52.13124 1.490977 TCGA High_EMT
3 ACC.TCGA.OR.A5J3.01A.11R.A29S.07 ACC 51.58918 41.08373 1.364831 TCGA High_EMT
4 ACC.TCGA.OR.A5J5.01A.11R.A29S.07 ACC 51.96321 46.46752 1.793465 TCGA High_EMT
5 ACC.TCGA.OR.A5J6.01A.31R.A29S.07 ACC 48.42721 47.61936 0.883014 TCGA High_EMT
6 ACC.TCGA.OR.A5J7.01A.11R.A29S.07 ACC 62.40426 88.00267 1.109323 TCGA High_EMT
pseudospace_status
1 Early_Pseudotime
2 Early_Pseudotime
3 Early_Pseudotime
4 Early_Pseudotime
5 Late_Pseudotime
绘图
library(ggplot2)
library(ggridges)
library(corrplot)
ggplot(input_cp_final2,
aes(x=mock_pseudospace, y=EMT_scores,color=new_ann)) +
geom_point(shape=18,size=2,alpha=0.5)+scale_x_reverse()+
scale_color_manual(values=c('#ee0c0c','#B5B7FF'))+
geom_smooth(aes(group=new_ann),method = "lm", formula = y ~ poly(x, 10),se=TRUE, linetype="dashed",color="blue")+
geom_hline(yintercept=0, linetype="dashed", color = "black")+theme_classic()
input_cp_final3<-input_cp_final2[input_cp_final2$new_ann%in%"MET500",]
chisq <- chisq.test(table(input_cp_final3$pseudospace_status,input_cp_final3$emt_status)[2:1,])
contrib <- 100*chisq$residuals^2/chisq$statistic
corrplot(chisq$residuals, is.cor = FALSE)
corrplot(contrib, is.cor = FALSE)
「往期文章:」 「1. 最全WGCNA教程(替换数据即可出全部结果与图形)」
「2. 精美图形绘制教程」
小杜的生信筆記 ,主要发表或收录生物信息学的教程,以及基于R的分析和可视化(包括数据分析,图形绘制等);分享感兴趣的文献和学习资料!!