-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCAGA_violin(Fig3F).Rmd
More file actions
62 lines (45 loc) · 1.28 KB
/
CAGA_violin(Fig3F).Rmd
File metadata and controls
62 lines (45 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
```{r}
library(dplyr)
library(ggplot2)
library(ggpubr)
library(scales)
```
```{r}
# Define paths
data_dir <- Sys.getenv("MYDATA")
# function to load data
load_csv <- function(filename) {
read.csv(file.path(data_dir, "exon_diff", filename), stringsAsFactors = FALSE)
}
# Load datasets
NVS <- load_csv("Exp1_NVSSM1_25nM_vs_DMSO.csv")
```
```{r}
NVS_AGA <- NVS %>%
dplyr::filter(Exon3 == "AGA") %>%
dplyr::filter(included == "yes") %>%
dplyr::mutate(
group = ifelse(Exon4 == "CAGA", "CAGA", "Other"))
my_comparisons <- list(c("Other", "CAGA"))
p <- ggplot(NVS_AGA,
aes(x = group, y = HbondIntron, fill = group)) +
# Violin
geom_violin(trim = FALSE, alpha = 0.7, width = 1, color = "black") +
# Dots on top
geom_jitter(width = 0.12, size = 1.8, alpha = 0.8, color = "black") +
scale_fill_manual(values = c("Other" = "grey70", "CAGA" = "grey40")) +
labs(
x = "",
y = "Complementarity score",
title = "Exp1 NVSSM1 25 nM: CAGA vs all other AGA exons"
) +
theme_classic(base_size = 14) +
theme(
legend.position = "none",
plot.title = element_text(hjust = 0.5, face = "bold"),
axis.text = element_text(color = "black"),
axis.line = element_line(color = "black"),
axis.ticks = element_line(color = "black")
)
p
```