diff --git a/src/hictk/cli/cli_convert.cpp b/src/hictk/cli/cli_convert.cpp index 56ef8cba..ee2dc1f0 100644 --- a/src/hictk/cli/cli_convert.cpp +++ b/src/hictk/cli/cli_convert.cpp @@ -225,6 +225,9 @@ void Cli::transform_args_convert_subcommand() { if (c.tmp_dir.empty()) { c.tmp_dir = c.path_to_output.parent_path(); } + + c.tmp_dir /= c.path_to_output.filename(); + c.tmp_dir.replace_extension(".tmp"); } } // namespace hictk::tools diff --git a/src/hictk/convert/cool_to_hic.cpp b/src/hictk/convert/cool_to_hic.cpp index 468890dc..af723ceb 100644 --- a/src/hictk/convert/cool_to_hic.cpp +++ b/src/hictk/convert/cool_to_hic.cpp @@ -288,8 +288,7 @@ static bool dump_weights(const ConvertConfig& c, const std::filesystem::path& we void cool_to_hic(const ConvertConfig& c) { std::ignore = find_java(); - const internal::TmpDir tmpdir{ - c.tmp_dir / std::filesystem::path(c.path_to_input.filename()).replace_extension(".tmp")}; + const internal::TmpDir tmpdir{c.tmp_dir}; const auto chrom_sizes = tmpdir() / "reference.chrom.sizes"; const auto pixels = [&]() {