From cf2d7282127f8d14dd3007192e6cece920fe20ca Mon Sep 17 00:00:00 2001 From: Nick Croucher Date: Wed, 13 Mar 2024 21:00:35 +0000 Subject: [PATCH 1/7] Update python version used --- environment.yml | 9 +++++---- python/gubbins/PreProcessFasta.py | 3 +++ python/gubbins/ValidateFastaAlignment.py | 3 +++ python/gubbins/__init__.py | 3 ++- python/gubbins/common.py | 2 ++ python/gubbins/pyjar.py | 5 +++-- python/gubbins/run_gubbins.py | 2 +- python/gubbins/treebuilders.py | 2 ++ python/gubbins/utils.py | 2 ++ 9 files changed, 23 insertions(+), 8 deletions(-) diff --git a/environment.yml b/environment.yml index 6d961b74..61a94cc6 100644 --- a/environment.yml +++ b/environment.yml @@ -1,4 +1,4 @@ -name: gubbins_env +name: test_gubbins_env channels: - conda-forge - bioconda @@ -6,7 +6,7 @@ channels: - r dependencies: # python - - python>=3.8 + - python>=3.8,<3.11 # installation - autoconf - automake @@ -26,8 +26,9 @@ dependencies: - dendropy - biopython - multiprocess - - numpy<=1.23.0 - - numba + - llvmlite=0.41.0 + - numpy>=1.25,<1.26 + - numba=0.58.0 # phylogenetics - raxml=8.2.12 - iqtree>=2.2 diff --git a/python/gubbins/PreProcessFasta.py b/python/gubbins/PreProcessFasta.py index bb91fa7e..5714cd1a 100644 --- a/python/gubbins/PreProcessFasta.py +++ b/python/gubbins/PreProcessFasta.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python +# encoding: utf-8 + import sys import hashlib from Bio import AlignIO diff --git a/python/gubbins/ValidateFastaAlignment.py b/python/gubbins/ValidateFastaAlignment.py index 85d3c0a1..5be757f2 100644 --- a/python/gubbins/ValidateFastaAlignment.py +++ b/python/gubbins/ValidateFastaAlignment.py @@ -1,3 +1,6 @@ +#!/usr/bin/env python +# encoding: utf-8 + import os import re import sys diff --git a/python/gubbins/__init__.py b/python/gubbins/__init__.py index 06010447..6aed4ed7 100644 --- a/python/gubbins/__init__.py +++ b/python/gubbins/__init__.py @@ -1,4 +1,5 @@ -#! /usr/bin/env python3 +#!/usr/bin/env python +# encoding: utf-8 """ Imports into the `gubbins` namespace all fundamental diff --git a/python/gubbins/common.py b/python/gubbins/common.py index c9e3bf39..08c6dcf5 100644 --- a/python/gubbins/common.py +++ b/python/gubbins/common.py @@ -1,4 +1,6 @@ +#!/usr/bin/env python # encoding: utf-8 +# # Wellcome Trust Sanger Institute # Copyright (C) 2013 Wellcome Trust Sanger Institute # diff --git a/python/gubbins/pyjar.py b/python/gubbins/pyjar.py index 982889c4..2cdc15a7 100755 --- a/python/gubbins/pyjar.py +++ b/python/gubbins/pyjar.py @@ -1,5 +1,6 @@ -#!/usr/bin/env python3 - +#!/usr/bin/env python +# encoding: utf-8 +# # pyjar written by Simon Harris # code modified from https://github.com/simonrharris/pyjar # pyjar is free software, licensed under GPLv3. diff --git a/python/gubbins/run_gubbins.py b/python/gubbins/run_gubbins.py index 96e5f544..61969272 100755 --- a/python/gubbins/run_gubbins.py +++ b/python/gubbins/run_gubbins.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # encoding: utf-8 # # Wellcome Trust Sanger Institute diff --git a/python/gubbins/treebuilders.py b/python/gubbins/treebuilders.py index 01546e71..5f531a53 100644 --- a/python/gubbins/treebuilders.py +++ b/python/gubbins/treebuilders.py @@ -1,4 +1,6 @@ +#!/usr/bin/env python # encoding: utf-8 +# # Wellcome Trust Sanger Institute # Copyright (C) 2013 Wellcome Trust Sanger Institute # diff --git a/python/gubbins/utils.py b/python/gubbins/utils.py index fdc4dbd3..dc19a8fe 100644 --- a/python/gubbins/utils.py +++ b/python/gubbins/utils.py @@ -1,4 +1,6 @@ +#!/usr/bin/env python # encoding: utf-8 +# # Wellcome Trust Sanger Institute # Copyright (C) 2013 Wellcome Trust Sanger Institute # From 9ccf8a3f10b137dbf8676c41edc135a8ac41302b Mon Sep 17 00:00:00 2001 From: Nick Croucher Date: Wed, 13 Mar 2024 21:01:03 +0000 Subject: [PATCH 2/7] Bump version --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index bea438e9..a0891f56 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.3.1 +3.3.4 From 10437227b9f55c1fd7377fa2006cccba0f0541a6 Mon Sep 17 00:00:00 2001 From: Nick Croucher Date: Wed, 13 Mar 2024 21:12:47 +0000 Subject: [PATCH 3/7] Remove llvmlite --- environment.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/environment.yml b/environment.yml index 61a94cc6..a140674f 100644 --- a/environment.yml +++ b/environment.yml @@ -26,7 +26,6 @@ dependencies: - dendropy - biopython - multiprocess - - llvmlite=0.41.0 - numpy>=1.25,<1.26 - numba=0.58.0 # phylogenetics From 7d7fcc1cf1d4d7142e9bcc1a3e6be9f90f82fcd8 Mon Sep 17 00:00:00 2001 From: Nick Croucher Date: Wed, 13 Mar 2024 21:14:16 +0000 Subject: [PATCH 4/7] Allow for files with spaces in paths --- python/gubbins/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/gubbins/common.py b/python/gubbins/common.py index 08c6dcf5..f48ed1bc 100644 --- a/python/gubbins/common.py +++ b/python/gubbins/common.py @@ -226,7 +226,7 @@ def parse_and_run(input_args, program_description=""): printer.print("...done. Run time: {:.2f} s".format(time.time() - start_time)) # Find all SNP sites with Gubbins - gubbins_command = " ".join([gubbins_exec, input_args.alignment_filename]) + gubbins_command = f"{gubbins_exec} \"{input_args.alignment_filename}\"" printer.print(["\nRunning Gubbins to detect SNPs...", gubbins_command]) try: subprocess.check_call(gubbins_command, shell=True) From 1186fc232dea9f468d8118d77f7b84de94849e72 Mon Sep 17 00:00:00 2001 From: Nick Croucher Date: Wed, 13 Mar 2024 21:15:59 +0000 Subject: [PATCH 5/7] Correct env name --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index a140674f..b1d71adb 100644 --- a/environment.yml +++ b/environment.yml @@ -1,4 +1,4 @@ -name: test_gubbins_env +name: gubbins_env channels: - conda-forge - bioconda From 9d1c60480e8382b85c907d98c7e218dee99b03ca Mon Sep 17 00:00:00 2001 From: Nick Croucher Date: Wed, 13 Mar 2024 21:20:12 +0000 Subject: [PATCH 6/7] Revert version constriants --- environment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index b1d71adb..bde92a3d 100644 --- a/environment.yml +++ b/environment.yml @@ -26,8 +26,8 @@ dependencies: - dendropy - biopython - multiprocess - - numpy>=1.25,<1.26 - - numba=0.58.0 + - numpy<=1.23.0 + - numba # phylogenetics - raxml=8.2.12 - iqtree>=2.2 From ff9394a6bf1f5e5df086a45792d608ddbf196d58 Mon Sep 17 00:00:00 2001 From: nickjcroucher Date: Thu, 11 Apr 2024 10:16:05 +0100 Subject: [PATCH 7/7] Update VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index a0891f56..fa7adc7a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.3.4 +3.3.5