Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
genotoul-bioinfo
metagWGS
Commits
2b61f674
Commit
2b61f674
authored
Jan 10, 2022
by
VIENNE MAINA
Browse files
correct eggnog mapper version bug while not use
parent
57e6e8b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
bin/scrape_software_versions.py
View file @
2b61f674
...
...
@@ -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
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment