Commit 0fa08f53 authored by VIENNE MAINA's avatar VIENNE MAINA
Browse files

correct eggnog mapper version bug while not use

parent bf345441
......@@ -2,6 +2,7 @@
from __future__ import print_function
from collections import OrderedDict
import re
import os
regexes = {
'metagWGS': ['v_pipeline.txt', r"(\S+)"],
......@@ -49,11 +50,12 @@ results['Eggnog-Mapper'] = '<span style="color:#999999;\">N/A</span>'
# Search each file using its regex
for k, v in regexes.items():
with open(v[0]) as x:
versions = x.read()
match = re.search(v[1], versions)
if match:
results[k] = "v{}".format(match.group(1))
if os.path.exists(v[0]):
with open(v[0]) as x:
versions = x.read()
match = re.search(v[1], versions)
if match:
results[k] = "v{}".format(match.group(1))
# Remove software set to false in results
for k in results:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment