Skip to content

Commit 692ee0f

Browse files
committed
update
1 parent a4b03bd commit 692ee0f

File tree

4 files changed

+29
-14
lines changed

4 files changed

+29
-14
lines changed

randomise_summary.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1405,4 +1405,5 @@ def check_corrp_map_locations(corrp_map_classes):
14051405

14061406
if args.html_summary:
14071407
create_html(corrp_map_classes, df, args)
1408-
print(corrpMap.location.parent / 'randomise_summary.html')
1408+
print(f'HTML summary is saved in '
1409+
f"{corrpMap.location.parent / 'randomise_summary.html'}")

randomise_summary_web.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ def order_corrpMaps(corrpMaps):
2828

2929
def create_html(corrpMaps, df, args):
3030
"""Create html that summarizes randomise_summary.py outputs"""
31+
# git version
32+
command = 'git rev-parse HEAD'
33+
script_dir = os.path.dirname(os.path.realpath(__file__))
34+
os.chdir(script_dir)
35+
git_hash = os.popen(command).read()
36+
3137
corrpMaps = order_corrpMaps(corrpMaps)
3238
root = os.path.dirname(os.path.abspath(__file__))
3339
templates_dir = os.path.join(root, 'templates')
@@ -180,4 +186,5 @@ def create_html(corrpMaps, df, args):
180186
bin_sum_diff_figures=bin_sum_diff_figures,
181187
skel_vol_figures=skel_vol_figures,
182188
warped_map_figures=warped_map_figures,
189+
githash=git_hash
183190
))

templates/layout.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@
4545
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
4646
<ul class="dropdown-menu">
4747
<li><a href=https://github.com/pnlbwh/fsl_randomise target="_blank">script source</a></li>
48-
<li><a href="#">Another action</a></li>
49-
<li><a href="#">Something else here</a></li>
48+
<li>{% block git %}{% endblock %} </li>
5049
<li class="divider"></li>
5150
<li><a href="#">Separated link</a></li>
5251
</ul>
@@ -58,6 +57,9 @@
5857

5958
<div class="container-fluid">
6059
<h1>Psychiatry Neuroimaging Laboratory</h1>
60+
<br>
61+
<ul>Currently works the best with ENIGMA template</ul>
62+
6163
<h2>FSL Randomise summary</h2>
6264
{% block subtitle %}{% endblock %}
6365
<br>
@@ -92,6 +94,7 @@ <h2>FSL Randomise summary</h2>
9294
{% block footer %}
9395
FSL randomise output summary by randomise_summary.py.
9496
If you find an error, please report it to Kevin Cho ([email protected])
97+
If you have modalities detected as 'unknown', please contact Kevin about it.
9598
{% endblock %}
9699
</div>
97100
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">

templates/template.html

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,30 @@
88
<li class="active"><a href="#">html created using randomise_summary.py by {{ user }}</a></li>
99
{% endblock %}
1010

11+
{% block git %}
12+
<a href=https://github.com/pnlbwh/fsl_randomise/commit/{{ githash }} target="_blank">
13+
git hash used: <code>{{ githash }}</code></a>
14+
{% endblock %}
15+
1116
{% block subtitle %}
12-
<h4>- Data location : {{ location }}</h4>
13-
<h4>- Owner of the files :
17+
<h4><ul>Data location : <code>{{ location }}</code></ul></h4>
18+
<h4><ul>Owner of the files :
1419
{% for creater in owners %}
15-
{{ creater }}
20+
<code>{{ creater }}</code>
1621
{% endfor %}
17-
</h4>
18-
<h4>- Corrected p maps were created on :
22+
</ul></h4>
23+
<h4><ul>Corrected p maps were created on :
1924
{% for datec in datecs %}
2025
{{ datec }}
2126
{% endfor %}
22-
</h4>
27+
</ul></h4>
2328

2429
{% endblock %}
2530

2631
{% block matrixsummary %}
2732
<h2>Matrix summary</h2>
28-
<h4>Matrix file : {{ mat_location }}
29-
<h4>Total number of subjects : {{ total_number_of_subjects }}
30-
<br><br>
33+
<h4><ul>Matrix file : <code>{{ mat_location }}</code></ul></h4>
34+
<h4><ul>Total number of subjects : <code>{{ total_number_of_subjects }}</code></ul></h4>
3135
<div class="table-responsive">
3236
{{ mat_table|safe }}
3337
</div>
@@ -36,8 +40,7 @@ <h4>Total number of subjects : {{ total_number_of_subjects }}
3640

3741
{% block contrastsummary %}
3842
<h2>Contrast summary</h2>
39-
<h4>Contrast file : {{ con_location }}
40-
<br><br>
43+
<h4><ul>Contrast file : <code>{{ con_location }}</code></ul></h4>
4144
<div class="table-responsive">
4245
{{ con_table|safe }}
4346
</div>
@@ -46,6 +49,7 @@ <h4>Contrast file : {{ con_location }}
4649

4750
{% block outputsummary %}
4851
<h2>Output corrected p-map summary</h2>
52+
<ul>Please bear in mind that the FSL randomise p-values are 1-p values</ul>
4953
<div class="table-responsive">
5054
{{ table|safe }}
5155
</div>

0 commit comments

Comments
 (0)