From b486b6fa7e6db609569e253d3a447dba95ffaa94 Mon Sep 17 00:00:00 2001 From: Jakob Nybo Nissen Date: Fri, 28 Apr 2023 12:31:33 +0200 Subject: [PATCH] Bugfix: Create out_dir/tmp in parsebam if needed Temp files from PyCoverM are stored in out_dir/tmp/pycoverm, but the tmp directory was not created by the parsebam module. This led to a failure to make the pycoverm dir, crashing Vamb. Fix issue #167 --- CHANGELOG.md | 3 +++ vamb/__init__.py | 2 +- vamb/parsebam.py | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0ff84d4f..8f349206 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## v4.1.1 +* Create tmp directory in parsebam if needed for pycoverm (issue # 167) + ## v4.1.0 * Fix typo in output AAE_Z cluster names. They are now called e.g. "aae_z_1" instead of "aae_z1" diff --git a/vamb/__init__.py b/vamb/__init__.py index 1124c8d6..b519a9be 100644 --- a/vamb/__init__.py +++ b/vamb/__init__.py @@ -19,7 +19,7 @@ 7) Split bins using vamb.vambtools """ -__version__ = (4, 1, 0) +__version__ = (4, 1, 1) from . import vambtools from . import parsebam diff --git a/vamb/parsebam.py b/vamb/parsebam.py index a73cd840..32b3290c 100644 --- a/vamb/parsebam.py +++ b/vamb/parsebam.py @@ -164,7 +164,7 @@ def chunkwise_loading( target_refhash: Optional[bytes], mask: _np.ndarray, ) -> A: - _os.mkdir(cache_directory) + _os.makedirs(cache_directory) chunks = [ (i, min(len(paths), i + nthreads)) for i in range(0, len(paths), nthreads)