-
Notifications
You must be signed in to change notification settings - Fork 0
/
03plot_mean_len.R
36 lines (32 loc) · 1.07 KB
/
03plot_mean_len.R
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
#!usr/bin/env Rscript
suppressMessages(suppressWarnings({
library(tidyverse)
}))
path_len_mean <- "../results_analysis/tables/len_mean.csv"
read_csv(path_len_mean) %>%
ggplot(aes(sample, mean_len)) +
geom_bar(stat="identity",
width=.5,
color="black",
fill="lightgray") +
geom_errorbar(aes(ymin= mean_len - sd_len,
ymax= mean_len + sd_len),
width=.3) +
scale_y_continuous(expand=expansion(0),
limits=c(0, 135),
breaks=seq(0,130, 20)) +
labs(
title = "Avarage length of the sequences for each sample",
x = "Sample",
y = "Sequence length (pb)"
) +
theme_classic() +
theme(
plot.title=element_text(hjust=.5, face="bold", size = 14),
axis.title=element_text(face="bold", size = 12),
axis.text= element_text(color="black",size=11),
axis.text.x= element_text(angle=35, vjust=1, hjust=1)
)
ggsave("../results_analysis/plots/mean_len.png",
width=6,
height=5)