Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- setwd("/home/shobe/RibosomeProfilingFall2019/output/Degron")
- data_prefix = "/home/shobe/RibosomeProfilingFall2019/Data/Degron/"
- TEM <- read.delim(paste0(data_prefix, "mutant_TE_with_wildtype.txt"))
- TEW <- read.delim(paste0(data_prefix, "wildtype_TE_with_mutant.txt"))
- TEC <- read.delim(paste0(data_prefix, "TE_change_mutant_vs_wildtype.txt"))
- r <- data.frame(TEM = TEM$log2FoldChange, TEW = TEW$log2FoldChange, TEC = TEC$log2FoldChange, padj=TEC$padj)
- r$red <- abs(r$TEC) >= 1 & r$padj < 0.01
- r$red <- factor(r$red)
- print(summary(r))
- #r <- r[r$TEW > 0 & r$TEM > 0,]
- library(ggplot2)
- tplot <- ggplot(r, aes(y=TEM, x=TEW,col=red)) + geom_point()
- tplot <- tplot + labs(title="TEC MT vs WT", subtitle=paste0("l2fc >= 1, padj < 0.01 ", "n=", summary(r$red)[[2]] + summary(r$red)[[1]], " pink=",summary(r$red)[[2]]))
- tplot <- tplot + scale_color_manual(labels=c("below threshold", "above threshold"), values=c("darkgray", "#FF66B2"))
- tplot <- tplot + ylab(expression(paste(italic("tif32-td prt1-td"), " log2(TE)"))) +
- xlab("WT log2(TE)")
- tplot <- tplot + theme_light() + theme(legend.title = element_blank(), legend.position = "bottom",
- plot.title = element_text(hjust = 0.5),
- plot.subtitle = element_text(hjust=0.5))#+ theme_linedraw()
- #ggsave("Degron vs WT TEC.pdf",tplot, device=pdf)
- tplot + coord_fixed()
- # italic("tif32-td prt1-td")
Advertisement
Add Comment
Please, Sign In to add comment