-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add section to reports that show system info, tedana call and version #747
Changes from 12 commits
f968eb4
ccf832b
8044a99
5a53ced
5140f42
6d377e8
aded008
056ac84
80f4e64
fcf54fc
05d9ac3
9f8467c
7c8e901
10c9eba
865a3c6
cbd6801
acd594b
363bc46
942377f
ed7ab14
cc3dc8f
ec69f75
b6fb863
e34b6d0
0183e1d
69979c3
11b9701
4d3ed72
83ffeff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<div> | ||
<p> | ||
<span class="title">Tedana command used:</span> $command | ||
</p> | ||
<table> | ||
<tr> | ||
<td class="title">System:</td> | ||
<td>$system</td> | ||
</tr> | ||
<tr> | ||
<td class="title">Node:</td> | ||
<td>$node</td> | ||
</tr> | ||
<tr> | ||
<td class="title">Release:</td> | ||
<td>$release</td> | ||
</tr> | ||
<tr> | ||
<td class="title">System version:</td> | ||
<td>$sysversion</td> | ||
</tr> | ||
<tr> | ||
<td class="title">Machine:</td> | ||
<td>$machine</td> | ||
</tr> | ||
<tr> | ||
<td class="title">Processor:</td> | ||
<td>$processor</td> | ||
</tr> | ||
<tr> | ||
<td class="title">Python:</td> | ||
<td>$python</td> | ||
</tr> | ||
<tr> | ||
<td class="title">Tedana version:</td> | ||
<td>$tedana</td> | ||
</tr> | ||
</table> | ||
</div> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
""" | ||
Run the "canonical" TE-Dependent ANAlysis workflow. | ||
""" | ||
import inspect | ||
import json | ||
import os | ||
import sys | ||
|
@@ -340,6 +341,9 @@ def tedana_workflow(data, tes, out_dir='.', mask=None, | |
generated by this workflow, please visit | ||
https://tedana.readthedocs.io/en/latest/outputs.html | ||
""" | ||
frame = inspect.currentframe() | ||
_, _, _, arg_values = inspect.getargvalues(frame) | ||
|
||
out_dir = op.abspath(out_dir) | ||
if not op.isdir(out_dir): | ||
os.mkdir(out_dir) | ||
|
@@ -421,6 +425,10 @@ def tedana_workflow(data, tes, out_dir='.', mask=None, | |
verbose=verbose, | ||
) | ||
|
||
# Save system info to json | ||
info_dict = utils.get_system_info() | ||
info_dict["Python"] = sys.version | ||
|
||
n_samp, n_echos, n_vols = catd.shape | ||
LGR.debug('Resulting data shape: {}'.format(catd.shape)) | ||
|
||
|
@@ -679,6 +687,9 @@ def tedana_workflow(data, tes, out_dir='.', mask=None, | |
if verbose: | ||
io.writeresults_echoes(catd, mmix, mask, comptable, io_generator) | ||
|
||
# Generate tedana command with all API values | ||
tedana_command = utils.write_tedana_command(arg_values) | ||
|
||
# Write out BIDS-compatible description file | ||
derivative_metadata = { | ||
"Name": "tedana Outputs", | ||
|
@@ -692,7 +703,17 @@ def tedana_workflow(data, tes, out_dir='.', mask=None, | |
"A denoising pipeline for the identification and removal " | ||
"of non-BOLD noise from multi-echo fMRI data." | ||
), | ||
"CodeURL": "https://github.com/ME-ICA/tedana" | ||
"CodeURL": "https://github.com/ME-ICA/tedana", | ||
"Node": { | ||
"Name": info_dict["Node"], | ||
"System": info_dict["System"], | ||
"Machine": info_dict["Machine"], | ||
"Processor": info_dict["Processor"], | ||
"Release": info_dict["Release"], | ||
"Version": info_dict["Version"] | ||
}, | ||
"Python": info_dict["Python"], | ||
"Command": tedana_command | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When users use the Python function instead of the CLI, perhaps we could have the function call instead? I don't know if that's an easy thing to do though. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would be cool! I guess we could just write a silly function that turns the function call into a string as part of our utils file. |
||
} | ||
] | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following up from https://github.com/eurunuela/pySPFM/pull/28- I think it would be better if we could use the CLI commands directly, and not compile a tedana command when users don't use the CLI. WDYT of swapping out this function with the changes I proposed in pySPFM?