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
Michiel Cottaar
fsl_mrs
Commits
fde5c9c7
Unverified
Commit
fde5c9c7
authored
Jan 11, 2021
by
alexcraven
Committed by
GitHub
Jan 11, 2021
Browse files
Fix parse_metab_groups behaviour
parse_metab_groups failed for lists containing a single entry with '+' notation
parent
69b1442e
Changes
1
Hide whitespace changes
Inline
Side-by-side
fsl_mrs/utils/misc.py
View file @
fde5c9c7
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
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