-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFig_S6_Viz.Rmd
140 lines (102 loc) · 5.14 KB
/
Fig_S6_Viz.Rmd
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
---
title: "FigS6_Viz"
author: "Troy McDiarmid"
date: "2024-01-13"
output: html_document
---
```{r setup, include=FALSE}
library(tidyverse)
```
```{r}
##Lmax visualizations
Div_BB_combos <- read_csv("/Users/troymcdiarmid/Documents/U6_pro_series/Figs/Pub_Figs/FigS6_Final_Figure_Datasets/240305_DivpegRNA_combos.csv")
ggplot(Div_BB_combos, aes(x = Lmax)) +
geom_histogram(adjust=1.5, fill = "black", binwidth = 1) +
theme_classic() +
theme(axis.line = element_line(colour = 'black', size = 0.8)) +
theme(axis.ticks = element_line(colour = "black", size = 0.8)) +
scale_y_continuous(breaks = c(0,10000), labels = scales::scientific) +
theme(axis.ticks.length=unit(.2, "cm")) +
labs(title = "", x = "", y = "") +
theme(legend.position = "none") +
xlim(0,50) +
theme(text = element_text(family="Arial", colour = "black", size = 44))
ggsave("DivBB_All_Lmax_Dist.jpeg", width = 16, height = 3.5, path = "/Users/troymcdiarmid/Documents/U6_pro_series/Figs/Pub_Figs/")
##Filtering for just replacement-replacement interactions
Replacement_Div_BB_combos <- Div_BB_combos %>%
filter(!grepl("Extension", Variant_Type))
ggplot(Replacement_Div_BB_combos, aes(x = Lmax)) +
geom_histogram(adjust=1.5, fill = "#56B4E9", binwidth = 1) +
theme_classic() +
theme(axis.line = element_line(colour = 'black', size = 0.8)) +
theme(axis.ticks = element_line(colour = "black", size = 0.8)) +
scale_y_continuous(breaks = c(0,6000), labels = scales::scientific) +
theme(axis.ticks.length=unit(.2, "cm")) +
labs(title = "", x = "", y = "") +
theme(legend.position = "none") +
xlim(0,50) +
theme(text = element_text(family="Arial", colour = "black", size = 44))
ggsave("Replacement_Lmax_Dist.jpeg", width = 16, height = 3.5, path = "/Users/troymcdiarmid/Documents/U6_pro_series/Figs/Pub_Figs/")
##Filtering for just extension-extension interactions
Extension_Div_BB_combos <- Div_BB_combos %>%
filter(!grepl("Replacement", Variant_Type))
ggplot(Extension_Div_BB_combos, aes(x = Lmax)) +
geom_histogram(adjust=1.5, fill = "#CCA24C", binwidth = 1) +
theme_classic() +
theme(axis.line = element_line(colour = 'black', size = 0.8)) +
theme(axis.ticks = element_line(colour = "black", size = 0.8)) +
scale_y_continuous(breaks = c(0, 4000), labels = scales::scientific) +
theme(axis.ticks.length=unit(.2, "cm")) +
labs(title = "", x = "", y = "") +
theme(legend.position = "none") +
xlim(0,50) +
theme(text = element_text(family="Arial", colour = "black", size = 44))
ggsave("Extension_Lmax_Dist.jpeg", width = 16, height = 3.5, path = "/Users/troymcdiarmid/Documents/U6_pro_series/Figs/Pub_Figs/")
```
```{r}
##Same thing for reverse compliment
##Lmax visualizations
Div_BB_combos <- read_csv("/Users/troymcdiarmid/Documents/U6_pro_series/Figs/Pub_Figs/FigS6_Final_Figure_Datasets/240305_DivpegRNA_combos.csv")
ggplot(Div_BB_combos, aes(x = A_BRC_Lmax)) +
geom_histogram(adjust=1.5, fill = "black", binwidth = 1) +
theme_classic() +
theme(axis.line = element_line(colour = 'black', size = 0.8)) +
theme(axis.ticks = element_line(colour = "black", size = 0.8)) +
scale_y_continuous(breaks = c(0,20000), labels = scales::scientific) +
theme(axis.ticks.length=unit(.2, "cm")) +
labs(title = "", x = "", y = "") +
theme(legend.position = "none") +
xlim(0,50) +
theme(text = element_text(family="Arial", colour = "black", size = 44))
ggsave("DivBB_RC_All_Lmax_Dist.jpeg", width = 16, height = 3.5, path = "/Users/troymcdiarmid/Documents/U6_pro_series/Figs/Pub_Figs/")
##Filtering for just replacement-replacement interactions
Replacement_Div_BB_combos <- Div_BB_combos %>%
filter(!grepl("Extension", Variant_Type))
ggplot(Replacement_Div_BB_combos, aes(x = A_BRC_Lmax)) +
geom_histogram(adjust=1.5, fill = "#56B4E9", binwidth = 1) +
theme_classic() +
theme(axis.line = element_line(colour = 'black', size = 0.8)) +
theme(axis.ticks = element_line(colour = "black", size = 0.8)) +
scale_y_continuous(breaks = c(0,10000), labels = scales::scientific) +
theme(axis.ticks.length=unit(.2, "cm")) +
labs(title = "", x = "", y = "") +
theme(legend.position = "none") +
xlim(0,50) +
theme(text = element_text(family="Arial", colour = "black", size = 44))
ggsave("Replacement_RC_Lmax_Dist.jpeg", width = 16, height = 3.5, path = "/Users/troymcdiarmid/Documents/U6_pro_series/Figs/Pub_Figs/")
##Filtering for just synthetic-synthetic interactions
Extension_Div_BB_combos <- Div_BB_combos %>%
filter(!grepl("Replacement", Variant_Type))
ggplot(Extension_Div_BB_combos, aes(x = A_BRC_Lmax)) +
geom_histogram(adjust=1.5, fill = "#CCA24C", binwidth = 1) +
theme_classic() +
theme(axis.line = element_line(colour = 'black', size = 0.8)) +
theme(axis.ticks = element_line(colour = "black", size = 0.8)) +
scale_y_continuous(breaks = c(0,4000), labels = scales::scientific) +
theme(axis.ticks.length=unit(.2, "cm")) +
labs(title = "", x = "", y = "") +
theme(legend.position = "none") +
xlim(0,50) +
theme(text = element_text(family="Arial", colour = "black", size = 44))
ggsave("Extension_RC_Lmax_Dist.jpeg", width = 16, height = 3.5, path = "/Users/troymcdiarmid/Documents/U6_pro_series/Figs/Pub_Figs/")
```