From 79d8a549be490e7f0b30612917c8e668ee8a04e9 Mon Sep 17 00:00:00 2001
From: Laurent Modolo <laurent.modolo@ens-lyon.fr>
Date: Wed, 14 Jun 2023 10:35:01 +0200
Subject: [PATCH] kmerclust_plot.R: reduce memory consumption

---
 src/bin/kmerclust_plot.R | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/bin/kmerclust_plot.R b/src/bin/kmerclust_plot.R
index 9f7bca8..8f092d2 100644
--- a/src/bin/kmerclust_plot.R
+++ b/src/bin/kmerclust_plot.R
@@ -3,7 +3,6 @@ library(ggplot2)
 
 args <- commandArgs(trailingOnly = TRUE)
 print(args)
-load(file = paste0(args[1], ".Rdata"))
 load(file = paste0(args[1], "_boot.Rdata"))
 
 print(res)
@@ -17,6 +16,9 @@ res %>%
   geom_violin() +
   theme_bw()
 ggsave(paste0(args[1], "_WSS_BSS.pdf"))
+rm(res)
+
+load(file = paste0(args[1], ".Rdata"))
 count %>%
   ggplot(aes(x = count_m, y = count_f)) +
   theme_bw()
-- 
GitLab