library(tidyverse)
#Load in the dnci values
dnci_df<-read.csv("validation_output/dnci_combined_df.csv")
dnci_df
library(ggplot2)
grepl(dnci_df$group1)
grepl(x=dnci_df$group)
dnci_df%>%
unite(group_pair, c("group1", "group2"))
dnci_df%>%
unite(group_pair, c("group1", "group2"))%>%
ggplot()+
geom_violin(aes(color=group_pair))
dnci_df%>%
unite(group_pair, c("group1", "group2"))%>%
ggplot()+
geom_violin(aes(x=group_pair, y=DNCI))
dnci_df%>%
unite(group_pair, c("group1", "group2"))%>%
ggplot()+
geom_violin(aes(x=group_pair, y=DNCI))%>%
geom_boxplot()
dnci_df%>%
unite(group_pair, c("group1", "group2"))%>%
ggplot()+
geom_violin(aes(x=group_pair, y=DNCI))+
geom_boxplot()
dnci_df%>%
unite(group_pair, c("group1", "group2"))%>%
ggplot()+
geom_violin(aes(x=group_pair, y=DNCI))+
geom_boxplot(aes(x=group_pair, y=DNCI))
dnci_df%>%
unite(group_pair, c("group1", "group2"))%>%
ggplot()+
geom_violin(aes(x=group_pair, y=DNCI, color=group_pair, group = Platform))+
geom_boxplot(aes(x=group_pair, y=DNCI, color=group_pair, group = Platform))
dnci_df%>%
unite(group_pair, c("group1", "group2"))%>%
ggplot(aes(x = group_pair, y = DNCI, color = group_pair)) +
geom_violin(trim = FALSE, alpha = 0.4) +
geom_boxplot(width = 0.1, outlier.shape = NA, alpha = 0.6) +
theme_minimal() +
labs(x = "Group Pair", y = "DNCI") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
dnci_df %>%
unite(group_pair, c("group1", "group2"), sep = "_") %>%
ggplot(aes(x = group_pair, y = DNCI, fill = Platform)) +
geom_violin(position = position_dodge(width = 0.9), trim = FALSE, alpha = 0.4) +
geom_boxplot(width = 0.1, position = position_dodge(width = 0.9), outlier.shape = NA, alpha = 0.7) +
theme_minimal() +
labs(x = "Group Pair", y = "DNCI", fill = "Platform") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))
library(cowplot)
dnci_df %>%
unite(group_pair, c("group1", "group2"), sep = "_") %>%
ggplot(aes(x = group_pair, y = DNCI, fill = Platform)) +
geom_violin(position = position_dodge(width = 0.9), trim = FALSE, alpha = 0.4) +
geom_boxplot(width = 0.1, position = position_dodge(width = 0.9), outlier.shape = NA, alpha = 0.7) +
theme_minimal() +
labs(x = "Group Pair", y = "DNCI", fill = "Platform") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))+
theme_cowplot()
dnci_df %>%
unite(group_pair, c("group1", "group2"), sep = "_") %>%
ggplot(aes(x = group_pair, y = DNCI, fill = Platform)) +
geom_violin(position = position_dodge(width = 0.9), trim = FALSE, alpha = 0.4) +
geom_boxplot(width = 0.1, position = position_dodge(width = 0.9), outlier.shape = NA, alpha = 0.7) +
theme_minimal() +
labs(x = "Group Pair", y = "DNCI", fill = "Platform") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))+
ylim(-4, 0)+
theme_cowplot()
dnci_df %>%
unite(group_pair, c("group1", "group2"), sep = "_") %>%
ggplot(aes(x = group_pair, y = DNCI, fill = Platform)) +
geom_violin(position = position_dodge(width = 0.9), trim = FALSE, alpha = 0.4) +
geom_boxplot(width = 0.1, position = position_dodge(width = 0.9), outlier.shape = NA, alpha = 0.7) +
theme_minimal() +
labs(x = "Group Pair", y = "DNCI", fill = "Platform") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))+
ylim(-3.5, 0)+
theme_cowplot()
dnci_df %>%
unite(group_pair, c("group1", "group2"), sep = "-") %>%
ggplot(aes(x = group_pair, y = DNCI, fill = Platform)) +
geom_violin(position = position_dodge(width = 0.9), trim = FALSE, alpha = 0.4) +
geom_boxplot(width = 0.1, position = position_dodge(width = 0.9), outlier.shape = NA, alpha = 0.7) +
theme_minimal() +
labs(x = "Group Pair", y = "DNCI", fill = "Platform") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))+
ylim(-3.5, 0)+
theme_cowplot()
dnci_df<-read.csv("validation_output/dnci_combined_df.csv")
dnci_df
dnci_df %>%
unite(group_pair, c("group1", "group2"), sep = "-") %>%
ggplot(aes(x = group_pair, y = DNCI, fill = programming_language)) +
geom_violin(position = position_dodge(width = 0.9), trim = FALSE, alpha = 0.4) +
geom_boxplot(width = 0.1, position = position_dodge(width = 0.9), outlier.shape = NA, alpha = 0.7) +
theme_minimal() +
labs(x = "Group Pair", y = "DNCI", fill = "programming_language") +
theme(axis.text.x = element_text(angle = 45, hjust = 1))+
ylim(-3.5, 0)+
theme_cowplot()
dnci_df %>%
unite(group_pair, c("group1", "group2"), sep = "-") %>%
ggplot(aes(x = group_pair, y = DNCI, fill = programming_language)) +
geom_violin(position = position_dodge(width = 0.9), trim = FALSE, alpha = 0.4) +
geom_boxplot(width = 0.1, position = position_dodge(width = 0.9), outlier.shape = NA, alpha = 0.7) +
theme_minimal() +
labs(x = "Group Pair", y = "DNCI", fill = "Programming Language") +
theme(axis.text.x = element_text(angle = 45, hjust = 1), legend.position = "bottom")+
ylim(-3.5, 0)+
theme_cowplot()
dnci_df %>%
unite(group_pair, c("group1", "group2"), sep = "-") %>%
ggplot(aes(x = group_pair, y = DNCI, fill = programming_language)) +
geom_violin(position = position_dodge(width = 0.9), trim = FALSE, alpha = 0.4) +
geom_boxplot(width = 0.1, position = position_dodge(width = 0.9), outlier.shape = NA, alpha = 0.7) +
theme_minimal() +
labs(x = "Group Pair", y = "DNCI", fill = "Programming Language") +
theme(axis.text.x = element_text(angle = 45, hjust = 1), legend.position = "bottom")+
ylim(-3.5, 0)+
theme_cowplot()
dnci_df %>%
unite(group_pair, c("group1", "group2"), sep = "-") %>%
ggplot(aes(x = group_pair, y = DNCI, fill = programming_language)) +
geom_violin(position = position_dodge(width = 0.9), trim = FALSE, alpha = 0.4) +
geom_boxplot(width = 0.1, position = position_dodge(width = 0.9), outlier.shape = NA, alpha = 0.7) +
labs(x = "Group Pair", y = "DNCI", fill = "Programming Language") +
theme(axis.text.x = element_text(angle = 45, hjust = 1), legend.position = "bottom")+
ylim(-3.5, 0)+
theme_cowplot()
dnci_plot<-dnci_df %>%
unite(group_pair, c("group1", "group2"), sep = "-") %>%
ggplot(aes(x = group_pair, y = DNCI, color = programming_language, fill = programming_language)) +
geom_violin(position = position_dodge(width = 0.9), trim = FALSE, alpha = 0.4) +
geom_boxplot(width = 0.1, position = position_dodge(width = 0.9), outlier.shape = NA, alpha = 0.7) +
labs(x = "Group Pair", y = "DNCI", color = programming_language, fill = "Programming Language") +
theme(axis.text.x = element_text(angle = 45, hjust = 1), legend.position = "bottom")+
ylim(-3.5, 0)+
theme_cowplot()
dnci_plot<-dnci_df %>%
unite(group_pair, c("group1", "group2"), sep = "-") %>%
ggplot(aes(x = group_pair, y = DNCI, color = programming_language, fill = programming_language)) +
geom_violin(position = position_dodge(width = 0.9), trim = FALSE, alpha = 0.4) +
geom_boxplot(width = 0.1, position = position_dodge(width = 0.9), outlier.shape = NA, alpha = 0.7) +
labs(x = "Group Pair", y = "DNCI", color = "Programming Language", fill = "Programming Language") +
theme(axis.text.x = element_text(angle = 45, hjust = 1), legend.position = "bottom")+
ylim(-3.5, 0)+
theme_cowplot()
dnci_plot
ggsave(dnci_plot, "validation_output/dnci_plot.png", dpi=300, width = 10, height = 5)
ggsave("validation_output/dnci_plot.png", dnci_plot, dpi=300, width = 10, height = 5)
ggsave("validation_output/dnci_plot.png", dnci_plot, dpi=300, width = 8, height = 5, bg ="white")
