diff --git a/CHEWBBACA/__init__.py b/CHEWBBACA/__init__.py index 39ebcde3..e665f756 100644 --- a/CHEWBBACA/__init__.py +++ b/CHEWBBACA/__init__.py @@ -1,2 +1,2 @@ -__version__ = "3.3.3" +__version__ = "3.3.4" diff --git a/CHEWBBACA/docs/conf.py b/CHEWBBACA/docs/conf.py index f8a2f460..e0e9cded 100644 --- a/CHEWBBACA/docs/conf.py +++ b/CHEWBBACA/docs/conf.py @@ -22,7 +22,7 @@ author = 'Rafael Mamede' # The full version, including alpha/beta/rc tags -release = '3.3.3' +release = '3.3.4' # -- General configuration --------------------------------------------------- diff --git a/CHEWBBACA/utils/parameters_validation.py b/CHEWBBACA/utils/parameters_validation.py index 86bae81f..bf569f12 100644 --- a/CHEWBBACA/utils/parameters_validation.py +++ b/CHEWBBACA/utils/parameters_validation.py @@ -1316,18 +1316,19 @@ def check_unique_prefixes(input_list): """ input_paths = fo.read_lines(input_list) basenames = [fo.file_basename(file) for file in input_paths] - unique_ids = [fo.split_joiner(name, [0], '.') for name in basenames] + unique_ids = {} + for name in basenames: + prefix = fo.split_joiner(name, [0], '.') + unique_ids.setdefault(prefix, []).append(name) # Detect if some inputs share the same unique prefix if len(set(unique_ids)) < len(input_paths): - basename_counts = [[name, basenames.count(name)] - for name in set(basenames)] - repeated_basenames = ['{0}: {1}'.format(*l) - for l in basename_counts if l[1] > 1] - sys.exit('\nSome input files share the same filename prefix ' - '(substring before the first "." in the filename). ' - 'Please make sure that every input file has a unique ' - 'filename prefix.\n{0}'.format('\n'.join(repeated_basenames))) + repeated_basenames = [v for k, v in unique_ids.items() if len(v) > 1] + repeated_basenames = [','.join(l) for l in repeated_basenames] + sys.exit('The following input files share the same filename prefix ' + '(substring before the first "." in the filename):\n{0}\n' + 'Please ensure that every input file has a unique ' + 'filename prefix.'.format('\n'.join(repeated_basenames))) return False @@ -1354,7 +1355,7 @@ def check_blanks(input_list): include_blanks = [name for name in basenames if ' ' in name] if len(include_blanks) > 0: - sys.exit('\nThe following input files include blank spaces ' + sys.exit('The following input files include blank spaces ' 'in the filename:\n{0}\nPlease ensure that filenames ' 'do not include blank spaces or special characters ' '(e.g. !@#?$^*()+)'.format('\n'.join(include_blanks))) diff --git a/CITATION.cff b/CITATION.cff index 4d0f0b25..f8c4d5ff 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -13,7 +13,7 @@ authors: given-names: João - family-names: Ramirez given-names: Mário -version: 3.3.0 +version: 3.3.4 date-released: "2023-06-29" keywords: - bioinformatics diff --git a/pyproject.toml b/pyproject.toml index 3360a4c1..5c9ca16b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "chewBBACA" -version = "3.3.3" +version = "3.3.4" requires-python = ">=3.8" dependencies = [ "numpy~=1.24.3",