Skip to content

Commit fbb68db

Browse files
authored
Merge pull request #468 from cov-lineages/all_version_dev
All version dev
2 parents 78c24e8 + 9d97149 commit fbb68db

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

pangolin/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
_program = "pangolin"
2-
__version__ = "4.1"
2+
__version__ = "4.1.1"
33

44

55
__all__ = ["pangolearn",

pangolin/utils/initialising.py

+11-1
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,20 @@ def print_alias_file_exit(alias_file):
197197

198198
sys.exit(0)
199199

200+
def get_version(programs):
201+
for program in programs:
202+
cmd = [f"{program} --version"]
203+
output = subprocess.run(cmd, shell=True, check=True,
204+
stdout=subprocess.PIPE, encoding='utf-8')
205+
version = output.stdout.strip().split()[-1].strip('()v')
206+
print(f"{program.split()[0]} {version}")
207+
200208
def print_conda_version(pkg_list):
201209
for pkg in pkg_list:
202210
try:
203211
result = subprocess.run(['conda', 'list', pkg],
204212
stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True)
213+
205214
except subprocess.CalledProcessError as e:
206215
stderr = e.stderr.decode('utf-8')
207216
sys.stderr.write(cyan(f"Error: {e}:\n{stderr}\n"))
@@ -223,7 +232,8 @@ def print_versions_exit(config):
223232
if config[KEY_PANGOLIN_ASSIGNMENT_VERSION] is not None:
224233
print(f"pangolin-assignment: {config[KEY_PANGOLIN_ASSIGNMENT_VERSION]}")
225234
# Print versions of other important tools used by pangolin
226-
print_conda_version(['usher', 'ucsc-fatovcf', 'gofasta', 'minimap2'])
235+
get_version(['usher', 'gofasta', 'minimap2'])
236+
# print_conda_version(['usher', 'ucsc-fatovcf', 'gofasta', 'minimap2'])
227237
sys.exit(0)
228238

229239
def set_up_verbosity(config):

0 commit comments

Comments
 (0)