Commit 75f8c592 authored by Venkat Malladi's avatar Venkat Malladi

update E2 basal comparison.

parent 35a0c84f
......@@ -265,7 +265,7 @@ MLK_RIP_PI_d <- DGEList(counts=as.matrix(MLK_RIP_PI_counts_sno), lib.size=MLK_RI
MLK_RIP_PI_rpkm <- data.frame(rpkm(MLK_RIP_PI_d,width(sno_tx)))
MLK_RIP_PARP_d <- DGEList(counts=as.matrix(MLK_RIP_PARP_counts_sno), lib.size=MLK_RIP_PARP_lib_sno)
MLK_RIP_PARP_rpkm <- data.frame(rpkm(MLK_RIP_PARP_d,width(sno_tx)))
MLK_RIP_PARP_rpkm_sno <- MLK_RIP_PARP_rpkm
MLK_RIP_FC <- data.frame((MLK_RIP_PARP_rpkm+1)/(MLK_RIP_PI_rpkm+1))
mlk_sno_rpkm_fc <- sno_tx[MLK_RNA_sno_rpkm>=1 & MLK_RIP_FC>=2 ]
......@@ -291,6 +291,7 @@ MLK_RIP_PI_d <- DGEList(counts=as.matrix(MLK_RIP_PI_counts_sn), lib.size=MLK_RIP
MLK_RIP_PI_rpkm <- data.frame(rpkm(MLK_RIP_PI_d,width(sn_tx)))
MLK_RIP_PARP_d <- DGEList(counts=as.matrix(MLK_RIP_PARP_counts_sn), lib.size=MLK_RIP_PARP_lib_sn)
MLK_RIP_PARP_rpkm <- data.frame(rpkm(MLK_RIP_PARP_d,width(sn_tx)))
MLK_RIP_PARP_rpkm_sn <- MLK_RIP_PARP_rpkm
MLK_RIP_FC <- data.frame((MLK_RIP_PARP_rpkm+1)/(MLK_RIP_PI_rpkm+1))
mlk_sn_rpkm_fc <- sn_tx[MLK_RNA_sn_rpkm>=1 & MLK_RIP_FC>=2 ]
......@@ -400,14 +401,14 @@ typeTesting <-matrix(c(63,19,38,76),nrow = 2,dimnames = list(Guess = c("bound",
fisher.test(typeTesting)
# Combine snRNA and snoRNA and print out
allsnotx <- data.frame(seqnames=seqnames(test),
starts=start(test)-1,
ends=end(test),
strand=strand(test),
tx_id = elementMetadata(test)$tx_name,
gene_id = unlist(elementMetadata(test)$gene_id))
allsnotx_rpkm <- cbind(allsnotx,test_2)
allsnotx <- data.frame(seqnames=seqnames(allsno),
starts=start(allsno)-1,
ends=end(allsno),
strand=strand(allsno),
tx_id = elementMetadata(allsno)$tx_name,
gene_id = unlist(elementMetadata(allsno)$gene_id))
allsnotx_rpkm <- cbind(allsnotx,allsno_rpkm)
sno_mapping <- read.csv("./gencode.v19.annotation_snoRNA_mapping.txt", header=F, sep=',')
sn_mapping <- read.csv("./gencode.v19.annotation_snRNA_mapping.txt", header=F, sep=',')
gencode_sn_mapping <-rbind(sno_mapping,sn_mapping)
......@@ -592,7 +593,7 @@ MLKE_RIP_PI_d <- DGEList(counts=as.matrix(MLKE_RIP_PI_counts_sno), lib.size=MLKE
MLKE_RIP_PI_rpkm <- data.frame(rpkm(MLKE_RIP_PI_d,width(sno_tx)))
MLKE_RIP_PARP_d <- DGEList(counts=as.matrix(MLKE_RIP_PARP_counts_sno), lib.size=MLKE_RIP_PARP_lib_sno)
MLKE_RIP_PARP_rpkm <- data.frame(rpkm(MLKE_RIP_PARP_d,width(sno_tx)))
MLKE_RIP_PARP_rpkm_sno <- MLKE_RIP_PARP_rpkm
MLKE_RIP_FC <- data.frame((MLKE_RIP_PARP_rpkm+1)/(MLKE_RIP_PI_rpkm+1))
mlke_sno_rpkm_fc <- sno_tx[MLKE_RNA_sno_rpkm>=1 & MLKE_RIP_FC>=2 ]
......@@ -619,6 +620,7 @@ MLKE_RIP_PI_d <- DGEList(counts=as.matrix(MLKE_RIP_PI_counts_sn), lib.size=MLKE_
MLKE_RIP_PI_rpkm <- data.frame(rpkm(MLKE_RIP_PI_d,width(sn_tx)))
MLKE_RIP_PARP_d <- DGEList(counts=as.matrix(MLKE_RIP_PARP_counts_sn), lib.size=MLKE_RIP_PARP_lib_sn)
MLKE_RIP_PARP_rpkm <- data.frame(rpkm(MLKE_RIP_PARP_d,width(sn_tx)))
MLKE_RIP_PARP_rpkm_sn <- MLKE_RIP_PARP_rpkm
MLKE_RIP_FC <- data.frame((MLKE_RIP_PARP_rpkm+1)/(MLKE_RIP_PI_rpkm+1))
mlke_sn_rpkm_fc <- sn_tx[MLKE_RNA_sn_rpkm>=1 & MLKE_RIP_FC>=2 ]
......@@ -772,6 +774,60 @@ overlap <- calculate.overlap(x = list("Basal" = basal_unique,"E2" = e2_unique))
jpeg('venndigram_basal_E2_snoRNA.jpg')
draw.pairwise.venn(area1 = length(overlap$a1), area2 = length(overlap$a2), cross.area = length(overlap$a3),col = c("royalblue4", "seagreen4"),lwd=4)
dev.off()
# RPKM boxplots of (B,C)
all_basal <- c(sno_tx,sn_tx)
allbasal_rpkm <- rbind(MLK_RIP_PARP_rpkm_sno,MLK_RIP_PARP_rpkm_sn)
alle2_rpkm <- rbind(MLKE_RIP_PARP_rpkm_sno,MLKE_RIP_PARP_rpkm_sn)
allbasal_rpkm_RNA <- rbind(MLK_RNA_sno_rpkm,MLK_RNA_sn_rpkm)
alle2_rpkm_RNA <- rbind(MLKE_RNA_sno_rpkm,MLKE_RNA_sn_rpkm)
all_basaltx <- data.frame(seqnames=seqnames(all_basal),
starts=start(all_basal)-1,
ends=end(all_basal),
strand=strand(all_basal),
tx_id = elementMetadata(all_basal)$tx_name,
gene_id = unlist(elementMetadata(all_basal)$gene_id))
all_basaltx_rpkm <- cbind(all_basaltx,allbasal_rpkm)
all_e2tx_rpkm <- cbind(all_basaltx,alle2_rpkm)
all_basaltx_rpkm_RNA <- cbind(all_basaltx,allbasal_rpkm_RNA)
all_e2tx_rpkm_RNA <- cbind(all_basaltx,alle2_rpkm_RNA)
both_basal_e2 <- cbind(basal=all_basaltx_rpkm[all_basaltx_rpkm$tx_id %in% overlap$a3,]$Sample1,e2=all_e2tx_rpkm[all_e2tx_rpkm$tx_id %in% overlap$a3,]$Sample1)
both_basal_e2_RNA <- cbind(basal=all_basaltx_rpkm_RNA[all_basaltx_rpkm_RNA$tx_id %in% overlap$a3,]$Sample1,e2=all_e2tx_rpkm_RNA[all_e2tx_rpkm_RNA$tx_id %in% overlap$a3,]$Sample1)
only_e <- overlap$a2[!(overlap$a2 %in% overlap$a3)]
only_e2 <- cbind(basal=all_basaltx_rpkm[all_basaltx_rpkm$tx_id %in% only_e,]$Sample1,e2=allsnotx_e2_rpkm[allsnotx_e2_rpkm$tx_id %in% only_e,]$PARP1)
only_b <- overlap$a1[!(overlap$a1 %in% overlap$a3)]
only_basal <- cbind(basal=allsnotx_rpkm[allsnotx_rpkm$tx_id %in% only_b,]$PARP1,e2=all_e2tx_rpkm[all_e2tx_rpkm$tx_id %in% only_b,]$Sample1)
jpeg('boxplot_common_basal_e2.jpg')
boxplot(both_basal_e2,col=(c("royalblue4","seagreen4")),outline=FALSE,ylim = c(0,500),yaxt="n", cex.axis=1,las=2,lwd=4,lty=1)
axis(2, at=seq(0,500,100))
dev.off()
wilcox.test(both_basal_e2[,1], both_basal_e2[,2],paired=T)
jpeg('boxplot_common_basal_e2_RNA.jpg')
boxplot(both_basal_e2_RNA,col=(c("royalblue4","seagreen4")),outline=FALSE,ylim = c(0,125),yaxt="n", cex.axis=1,las=2,lwd=4,lty=1)
axis(2, at=seq(0,125,25))
dev.off()
wilcox.test(both_basal_e2_RNA[,1], both_basal_e2_RNA[,2],paired=T)
jpeg('boxplot_e2_only.jpg')
boxplot(only_e2,col=(c("royalblue4","seagreen4")),outline=FALSE,ylim = c(0,80),yaxt="n", cex.axis=1,las=2,lwd=4,lty=1)
axis(2, at=seq(0,80,20))
dev.off()
wilcox.test(only_e2[,1], only_e2[,2],paired=T)
jpeg('boxplot_basal_only.jpg')
boxplot(only_basal,col=(c("royalblue4","seagreen4")),outline=FALSE,ylim = c(0,250),yaxt="n", cex.axis=1,las=2,lwd=4,lty=1)
axis(2, at=seq(0,250,50))
dev.off()
wilcox.test(only_basal[,1], only_basal[,2],paired=T)
```
......
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