Skip to content

Commit dee7dbf

Browse files
authored
Merge pull request #6 from BIDS-Apps/shotgunosine-patch-1
[FIX] subj_id and warnings bugs
2 parents 29ac220 + ff8ee7a commit dee7dbf

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

reports/group.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ <h2>Subject {{ config['subj_id'] }} Summary</h2>
135135
{% if config['warnings'] %}
136136
<li>Warnings:
137137
<ul class="sub-simple">
138-
{% for warn in config['warnings'] %}
139-
<li>{{ warn }}</li>
138+
{% for warn_name, warn_text in config['warnings'].items() %}
139+
<li>{{ warn_name }}: {{ warn_text }}</li>
140140
{% endfor %}
141141
</ul>
142142
</li>

reports/individual.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,13 @@ <h2>Summary</h2>
111111

112112

113113
{% if warnings %}
114-
<li>Warnings:
115-
<ul class="sub-simple">
116-
{% for warn in warnings %}
117-
<li>{{ warn }}</li>
118-
{% endfor %}
119-
</ul>
120-
</li>
114+
<li>Warnings:
115+
<ul class="sub-simple">
116+
{% for warn_name, warn_text in warnings.items() %}
117+
<li>{{ warn_name }}: {{ warn_text }}</li>
118+
{% endfor %}
119+
</ul>
120+
</li>
121121
{% endif %}
122122

123123

run.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ def run(command, env={}, shell=False):
274274
pbd['orientation'] = pbn[3].split('+')[-1]
275275
pb_lod.append(pbd)
276276
pb_df = pd.DataFrame(pb_lod)
277-
config['subj'] = pb_df.subj.unique()[0]
277+
config['subj_id'] = pb_df.subj.unique()[0]
278278
config['blocks'] = ' '.join(pb_df.block.unique())
279279

280280
try:
@@ -293,7 +293,7 @@ def run(command, env={}, shell=False):
293293
try:
294294
if os.path.getsize(wf_path) > 0:
295295
with open(wf_path, 'r') as h:
296-
warns['wf'] = h.readlines()
296+
warns[wf] = h.readlines()
297297
except FileNotFoundError:
298298
pass
299299
if len(warns) > 0:

0 commit comments

Comments
 (0)