Commit 36e7a4e3 authored by Venkat Malladi's avatar Venkat Malladi

Forgot missing file.

parent 5049082c
......@@ -169,3 +169,56 @@ dev.off()
ddx21_pam.aov = aov(DDX21 ~ PAM,data=df_pd_tcag_gtex_pam)
summary(ddx21_pam.aov)
# Merge TCGA and GTeX
df_ET_pam <- data.frame(pd_tcga_breast_pam[,c('PARP1','DDX21','ER','Type')])
pd_gtex$ER <- "GTEX"
pd_gtex$Type <- "GTEX"
df_et_tcag_gtex <- rbind(df_ET_pam,pd_gtex)
# Update Metastatic to Primary Tumor Type
df_et_tcag_gtex$Type[df_et_tcag_gtex$Type == 'Metastatic'] <- 'Primary Tumor'
df_et_tcag_gtex_er <- df_et_tcag_gtex[complete.cases(df_et_tcag_gtex[ , 3]),]
df_et_tcag_gtex_er_type <- df_et_tcag_gtex_er[complete.cases(df_et_tcag_gtex_er[ , 4]),]
df_et_tcag_gtex_er_type_com <- df_et_tcag_gtex_er_type[which(df_et_tcag_gtex_er_type$ER %in% c('Negative','Positive','Normal')),]
# Seperate into PAM and type for different genes
df_et_tcag_gtex_er_type_com$PARP1 <- log2(df_et_tcag_gtex_er_type_com$PARP1)
df_et_tcag_gtex_er_type_com$DDX21 <- log2(df_et_tcag_gtex_er_type_com$DDX21)
df_et_tcag_gtex_er_type$ET <- paste(df_et_tcag_gtex_er_type$ER, df_et_tcag_gtex_er_type$Type, sep="")
## PARP1 and ER and Type
df_et_tcag_gtex_er_type_summary <- summarySE(df_et_tcag_gtex_er_type_com, measurevar="PARP1", groupvars=c("ER",'Type'))
p <- ggplot(df_et_tcag_gtex_er_type_summary, aes(x = as.factor(ER), fill= Type)) +
geom_boxplot(aes(
lower = PARP1 - se,
upper = PARP1 + se,
middle = PARP1,
ymin = PARP1 - 2*se,
ymax = PARP1 + 2*se),
stat = "identity",lwd=1.5) + geom_hline(yintercept = mean(df_et_tcag_gtex_er_type_com$PARP1), linetype = 2) + labs(y="RPKM",x="PAM") + theme_bw() + theme(panel.grid.major = element_blank(),panel.grid.minor = element_blank(),axis.ticks=element_line(size=1)) + scale_y_continuous(limits=c(3,5.5))
jpeg('figures/PARP1_breast_correlation_ER_TYPE_boxplot.jpg')
p
dev.off()
parp1_et.aov = aov(PARP1 ~ ER + Type ,data=df_et_tcag_gtex_er_type_summary)
summary(parp1_et.aov)
## PHF8 and ER and Type
df_ddx21_et_tcag_gtex_er_type_summary <- summarySE(df_et_tcag_gtex_er_type_com, measurevar="DDX21", groupvars=c("ER",'Type'))
p <- ggplot(df_ddx21_et_tcag_gtex_er_type_summary, aes(x = as.factor(ER), fill= Type)) +
geom_boxplot(aes(
lower = DDX21 - se,
upper = DDX21 + se,
middle = DDX21,
ymin = DDX21 - 2*se,
ymax = DDX21 + 2*se),
stat = "identity",lwd=1.5) + geom_hline(yintercept = mean(df_et_tcag_gtex_er_type_com$DDX21), linetype = 2) + labs(y="RPKM",x="PAM") + theme_bw() + theme(panel.grid.major = element_blank(),panel.grid.minor = element_blank(),axis.ticks=element_line(size=1)) + scale_y_continuous(limits=c(3.5,5))
jpeg('figures/DDX21_breast_correlation_ER_TYPE_boxplot.jpg')
p
dev.off()
ddx21_et.aov = aov(DDX21 ~ ER + Type, data=df_ddx21_et_tcag_gtex_er_type_summary)
summary(ddx21_et.aov)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment