1
1
library(ggplot2 );
2
- library(ggpubr )
3
-
2
+ library(svglite );
3
+ library( ggpubr );
4
4
arguments <- commandArgs(TRUE );
5
5
INPUT <- arguments [1 ];
6
6
OUTPUT <- arguments [2 ];
@@ -22,21 +22,21 @@ BRHcov <- read.table(file=INPUT, header=F, comment.char = "");
22
22
23
23
24
24
trans <- ggplot(BRHcov , aes(x = V3 )) +
25
- geom_bar (fill = " #3d9fac" , alpha = 0.8 , binwidth = 1 , position = " identity" ) +
25
+ geom_histogram (fill = " #3d9fac" , alpha = 0.8 , binwidth = 1 , position = " identity" ) +
26
26
xlab(paste(" \n " , QUERY , " Coverage\n " )) + ylab(" Count\n " ) + xlim(0 ,100 ) +
27
27
geom_vline(xintercept = median(BRHcov $ V3 ), linetype = " dashed" ) +
28
28
theme_bw();
29
29
30
30
subj <- ggplot(BRHcov , aes(x = V4 )) +
31
- geom_bar (fill = " #ef5030" , alpha = 0.8 , binwidth = 1 , position = " identity" ) +
31
+ geom_histogram (fill = " #ef5030" , alpha = 0.8 , binwidth = 1 , position = " identity" ) +
32
32
xlab(paste(SUBJECT , " Coverage\n " )) + ylab(" \n Count" ) + xlim(0 ,100 ) +
33
33
geom_vline(xintercept = median(BRHcov $ V4 ), linetype = " dashed" ) +
34
34
theme_bw() + coord_flip();
35
35
36
36
title <- ggparagraph(text = paste(" BRHs " , PROGRAM , " \n n = " , nrow(BRHcov )),
37
37
color = " black" , face = " bold" , size = 12 , );
38
38
arranged <- ggarrange(trans + rremove(" x.title" ), title , scatt , subj + rremove(" y.title" ), ncol = 2 , nrow = 2 , align = " hv" );
39
- ggexport(arranged , filename = OUTPUT );
39
+ ggexport(arranged , filename = OUTPUT , width = 500 , height = 500 );
40
40
# png(filename=OUTPUT);
41
41
# arrangeGrob(trans + rremove("x.title"), junk, scatt, subj + rremove("y.title"), ncol=2);
42
42
# dev.off();
0 commit comments