-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rhistory
27 lines (27 loc) · 1.11 KB
/
.Rhistory
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
source("code/R/general_functions.R")
getwd()
setwd("/home/giulianonetto/Desktop/tmp/lib_size/repo/libsize/")
source("code/R/general_functions.R")
library(patchwork)
theme_set(theme_pubr())
figs_dir <- "output/main_text_figures/final_figures/"
check_dir(figs_dir)
"
Figure 1 was made by hand :)
"
readr::read_tsv("data/raw/dna_concentrations/dna_concentration_data.tsv") %>% colnames()
readr::read_tsv("data/raw/dna_concentrations/dna_concentration_data.tsv") %>%
rename(dna_concentration := `dna_concentration(ng/uL)`) %>% head
readr::read_tsv("data/raw/dna_concentrations/dna_concentration_data.tsv") %>%
rename(dna_concentration := `dna_concentration(ng/uL)`) %>%
ggplot(aes(dna_concentration, ngs_reads + 1)) +
geom_boxplot(aes(group = factor(dna_concentration)), color = 'gray40', alpha = 0) +
geom_jitter(height = 0, width = .2, size = 2) +
geom_smooth(method = 'lm', formula = y ~ poly(x, 3)) +
yscale("log10", .format = TRUE) +
xscale("log10", .format = TRUE) +
labs(
x = expression(bold(paste("DNA concentration (",n,g,"/",mu,l, ")"))),
y = "# reads"
) +
theme(axis.title = element_text(face = "bold", color = "gray20", size = 12))