From e48b6bd953a5d88bca16be594bddb07aea6de3df Mon Sep 17 00:00:00 2001 From: aineniamh Date: Thu, 30 Jun 2022 19:14:53 +0100 Subject: [PATCH 1/3] #467 test fix, not including faToVcf --- pangolin/utils/initialising.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/pangolin/utils/initialising.py b/pangolin/utils/initialising.py index e504da6..a646bab 100644 --- a/pangolin/utils/initialising.py +++ b/pangolin/utils/initialising.py @@ -197,11 +197,20 @@ def print_alias_file_exit(alias_file): sys.exit(0) +def get_version(programs): + for program in programs: + cmd = [program, "--version"] + output = subprocess.run(cmd, shell=True, check=True, + stdout=subprocess.PIPE, encoding='utf-8') + version = output.stdout.strip().split()[-1].strip('()v') + print(f"{program.split()[0]} {version}") + def print_conda_version(pkg_list): for pkg in pkg_list: try: result = subprocess.run(['conda', 'list', pkg], stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True) + except subprocess.CalledProcessError as e: stderr = e.stderr.decode('utf-8') sys.stderr.write(cyan(f"Error: {e}:\n{stderr}\n")) @@ -223,7 +232,8 @@ def print_versions_exit(config): if config[KEY_PANGOLIN_ASSIGNMENT_VERSION] is not None: print(f"pangolin-assignment: {config[KEY_PANGOLIN_ASSIGNMENT_VERSION]}") # Print versions of other important tools used by pangolin - print_conda_version(['usher', 'ucsc-fatovcf', 'gofasta', 'minimap2']) + get_version(['usher', 'gofasta', 'minimap2']) + # print_conda_version(['usher', 'ucsc-fatovcf', 'gofasta', 'minimap2']) sys.exit(0) def set_up_verbosity(config): From aca98ff0b7b6b2e1a25aef902b5f66307cc841d4 Mon Sep 17 00:00:00 2001 From: aineniamh Date: Thu, 30 Jun 2022 19:26:35 +0100 Subject: [PATCH 2/3] fix for all versions --- pangolin/utils/initialising.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pangolin/utils/initialising.py b/pangolin/utils/initialising.py index a646bab..6deae29 100644 --- a/pangolin/utils/initialising.py +++ b/pangolin/utils/initialising.py @@ -199,7 +199,7 @@ def print_alias_file_exit(alias_file): def get_version(programs): for program in programs: - cmd = [program, "--version"] + cmd = [f"{program} --version"] output = subprocess.run(cmd, shell=True, check=True, stdout=subprocess.PIPE, encoding='utf-8') version = output.stdout.strip().split()[-1].strip('()v') From 9d971492ecf62d12ae62d04dd0e04b4505232afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ine=20O=27Toole?= Date: Thu, 30 Jun 2022 19:46:49 +0100 Subject: [PATCH 3/3] Update __init__.py --- pangolin/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pangolin/__init__.py b/pangolin/__init__.py index 01e6175..e18ab57 100644 --- a/pangolin/__init__.py +++ b/pangolin/__init__.py @@ -1,5 +1,5 @@ _program = "pangolin" -__version__ = "4.1" +__version__ = "4.1.1" __all__ = ["pangolearn",