From fcde5809559e6d58c88f6b6d83295fccec01a243 Mon Sep 17 00:00:00 2001 From: Roberto Rossini <71787608+robomics@users.noreply.github.com> Date: Mon, 7 Oct 2024 01:03:37 +0200 Subject: [PATCH] Ensure no temporary files are written when balancing .hic files with --in-memory --- src/hictk/balance/common.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/hictk/balance/common.hpp b/src/hictk/balance/common.hpp index 53b0a20e..a06ee862 100644 --- a/src/hictk/balance/common.hpp +++ b/src/hictk/balance/common.hpp @@ -192,7 +192,9 @@ inline int balance_hic(const BalanceConfig& c, const std::filesystem::path& tmp_ } const auto tmpfile = - tmp_dir / (std::filesystem::path{c.path_to_input}.filename().string() + ".tmp"); + tmp_dir.empty() + ? "" + : tmp_dir / (std::filesystem::path{c.path_to_input}.filename().string() + ".tmp"); const auto params = init_params(c, tmpfile); typename Balancer::Type mode{};