Skip to content

Commit c18cce2

Browse files
committed
Changed GridArrange for ggpubr because of broken update
1 parent 19704c7 commit c18cce2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

brh_cov.R

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
library(ggplot2);
2-
library(ggpubr)
3-
2+
library(svglite);
3+
library(ggpubr);
44
arguments <- commandArgs(TRUE);
55
INPUT <- arguments[1];
66
OUTPUT <- arguments[2];
@@ -22,21 +22,21 @@ BRHcov <- read.table(file=INPUT, header=F, comment.char = "");
2222

2323

2424
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") +
2626
xlab(paste("\n", QUERY, " Coverage\n")) + ylab("Count\n") + xlim(0,100) +
2727
geom_vline(xintercept= median(BRHcov$V3), linetype="dashed") +
2828
theme_bw();
2929

3030
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") +
3232
xlab(paste(SUBJECT, " Coverage\n")) + ylab("\nCount") + xlim(0,100) +
3333
geom_vline(xintercept= median(BRHcov$V4), linetype="dashed") +
3434
theme_bw() + coord_flip();
3535

3636
title <- ggparagraph(text=paste("BRHs ", PROGRAM, "\nn = ", nrow(BRHcov)),
3737
color = "black", face = "bold", size = 12, );
3838
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);
4040
#png(filename=OUTPUT);
4141
#arrangeGrob(trans + rremove("x.title"), junk, scatt, subj + rremove("y.title"), ncol=2);
4242
#dev.off();

0 commit comments

Comments
 (0)