Commit da8f0515 authored by Matteo Barcella's avatar Matteo Barcella
Browse files

Adding Arial family and missing lines

parent fd7cab10
# code for reproducing figures in paper
# AIM: create a dotplot / heatmap with genes of interest present in the attachment
# facets by category of interest shown in the excel
......@@ -11,6 +10,7 @@ library(DESeq2)
library(reshape2)
library(RColorBrewer)
library(scales)
library(dplyr)
# loading genelist file and create a dataframe ####
mydata <- read.xlsx(xlsxFile = "GeneList_Fig2A.xlsx")
......@@ -25,7 +25,7 @@ mydata$Cluster[37:45] <- "HSC"
# remove double entry AKT3
mydata <- subset(mydata, Gene != "AKT3.1")
mydata$Cluster <- gsub(pattern = "HSC", replacement = "HSC related", x = mydata$Cluster)
saveRDS(object = mydata, file = "Gene_list.rds")
#saveRDS(object = mydata, file = "Gene_list.rds")
# read data analysis input ####
......@@ -42,6 +42,18 @@ normacounts_NE <- normcounts[,rownames(colannotations)]
goi_expr <- as.matrix(normacounts_NE[mydata$Gene,])
DEGs_d4 <- myexpress$deseq$dge_res$`3DNEd4-2DNEd4`
DEGs_d4 <- subset.data.frame(DEGs_d4, subset = FDR < 0.05)
DEGs_d4$Gene <- rownames(DEGs_d4)
DEGs_d4$isDEGd4 <- "isDEG"
DEGs_d4 <- subset.data.frame(DEGs_d4, select = c("Gene","isDEGd4"))
DEGs_d7 <- myexpress$deseq$dge_res$`3DNEd7-2DNEd7`
DEGs_d7 <- subset.data.frame(DEGs_d7, subset = FDR < 0.05)
DEGs_d7$Gene <- rownames(DEGs_d7)
DEGs_d7$isDEGd7 <- "isDEG"
DEGs_d7 <- subset.data.frame(DEGs_d7, select = c("Gene","isDEGd7"))
## Version with means ####
goi_expr_means_melt <- melt(goi_expr)
......@@ -99,7 +111,8 @@ ggplot(goi_expr_melt_2_degannot, mapping = aes(x = variable, y = Gene, fill = va
panel.background = element_rect(fill = "white"),
strip.background = element_blank(),
panel.spacing = unit(1.3, "lines"),
strip.clip = "off",
#strip.clip = "off",
text = element_text(family = "Arial"),
panel.grid = element_line(colour = "lightgrey"), axis.title = element_blank())
dev.off()
......@@ -154,6 +167,7 @@ for(tpdata in names(exprlist)){
theme(legend.position = "bottom", #c(0.2,0.9),
legend.key.height = unit(units = "cm", x = 0.2),
legend.key.width = unit(units = "cm", x = 0.2),
text = element_text(family = "Arial"),
plot.title = element_text(hjust = 0.5)) +
ggtitle(paste0("3D vs 2D ", tpdata))
......@@ -162,3 +176,4 @@ for(tpdata in names(exprlist)){
width = 6, height = 6, dpi = 300)
}
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