From 4f33f1e3a9f44045290a6b5c59a2dabbb5a56b8f Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Fri, 9 Jun 2023 09:57:52 +0200
Subject: [PATCH] add kmerclust_plot.R

---
 src/bin/kmerclust_plot.R | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 src/bin/kmerclust_plot.R

diff --git a/src/bin/kmerclust_plot.R b/src/bin/kmerclust_plot.R
new file mode 100644
index 0000000..57d6408
--- /dev/null
+++ b/src/bin/kmerclust_plot.R
@@ -0,0 +1,22 @@
+library(kmerclust)
+library(ggplot2)
+
+args <- commandArgs(trailingOnly = TRUE)
+print(args)
+load(file = paste0(args[3], ".Rdata"))
+load(file = paste0(args[3], "_boot.Rdata"))
+
+res %>%
+  ggplot(aes(x = name, y = BIC)) +
+  geom_violin() %>%
+  theme_bw()
+ggsave(paste0(args[3], "_BIC.pdf"))
+res %>%
+  ggplot(aes(x = name, y = WSS_f / BSS)) +
+  geom_violin() %>%
+  theme_bw()
+ggsave(paste0(args[3], "_WSS_BSS.pdf"))
+count %>%
+  ggplot(aes(x = count_m, y = count_f)) %>%
+  theme_bw()
+ggsave(paste0(args[3], "_scatter.pdf"))
-- 
GitLab