Commit df0479a1 authored by VIENNE MAINA's avatar VIENNE MAINA
Browse files

correct eggnog mapper version bug while not use

parent bf345441
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
from __future__ import print_function from __future__ import print_function
from collections import OrderedDict from collections import OrderedDict
import re import re
import os
regexes = { regexes = {
'metagWGS': ['v_pipeline.txt', r"(\S+)"], 'metagWGS': ['v_pipeline.txt', r"(\S+)"],
...@@ -49,11 +50,12 @@ results['Eggnog-Mapper'] = '<span style="color:#999999;\">N/A</span>' ...@@ -49,11 +50,12 @@ results['Eggnog-Mapper'] = '<span style="color:#999999;\">N/A</span>'
# Search each file using its regex # Search each file using its regex
for k, v in regexes.items(): for k, v in regexes.items():
with open(v[0]) as x: if os.path.exists(v[0]):
versions = x.read() with open(v[0]) as x:
match = re.search(v[1], versions) versions = x.read()
if match: match = re.search(v[1], versions)
results[k] = "v{}".format(match.group(1)) if match:
results[k] = "v{}".format(match.group(1))
# Remove software set to false in results # Remove software set to false in results
for k in results: for k in results:
......
Supports Markdown
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