Unverified Commit fde5c9c7 authored by alexcraven's avatar alexcraven Committed by GitHub
Browse files

Fix parse_metab_groups behaviour

parse_metab_groups failed for lists containing a single entry with '+' notation
parent 69b1442e
......@@ -628,9 +628,16 @@ def parse_metab_groups(mrs,metab_groups):
if metab_groups.lower() == 'combine_all':
return [0]*mrs.numBasis
out = [0]*mrs.numBasis
out[mrs.names.index(metab_groups)] = 1
entry = metab_groups.split('+')
if isinstance(entry,str):
out[mrs.names.index(entry)] = 1
elif isinstance(entry,list):
for n in entry:
assert(isinstance(n,str))
out[mrs.names.index(n)] = 1
return out
......
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