-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_results_expansionhunter.R
32 lines (25 loc) · 1.1 KB
/
plot_results_expansionhunter.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
# Install these packages if they are not installed yet.
# install.packages("tidyverse")
# install.packages("ggbeeswarm")
# This R script will only plot for one tool specifically for ExpansionHunter
# If you want to compare tools, use plot_GIAB_sample_script.R
library(tidyverse)
library(ggbeeswarm)
data <- read.csv("results_expansionhunter.csv")
data %>%
ggplot(aes(x=Gene, y=Allele, fill=Gene, colour=Gene)) +
geom_beeswarm(shape="diamond", cex=1, size=1.3, na.rm=TRUE, dodge.width=1,
priority="descending") +
labs(y="Allele size",
title="Called allele size of GIAB samples per gene for
ExpansionHunter") + theme_bw()
ggsave(filename="Allele_size_per_gene_expansionhunter.png")
data %>%
ggplot(aes(x=Gene, y=Normalised, fill=Gene, colour=Gene)) +
geom_beeswarm(shape="diamond", cex=1, size=1.3, na.rm=TRUE, dodge.width=1,
priority="descending") +
labs(y="Normalised allele size",
title="Normalised allele size of GIAB samples per gene for
ExpansionHunter") +
theme_bw()
ggsave(filename="Allele_size_per_gene_expansionhunter_normalised.png")