-
Notifications
You must be signed in to change notification settings - Fork 12
ENH: Subcortical alignment workflow #72
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
Conversation
ffa7eee
to
8748be7
Compare
Codecov Report
@@ Coverage Diff @@
## master #72 +/- ##
==========================================
+ Coverage 31.53% 33.50% +1.97%
==========================================
Files 42 44 +2
Lines 3257 3462 +205
==========================================
+ Hits 1027 1160 +133
- Misses 2230 2302 +72
Continue to review full report at Codecov.
|
92700af
to
67e7684
Compare
67e7684
to
0be8a65
Compare
One of the biggest improvements this Nipype-ified workflow offers is parallelization. However, depending on the number of timepoints in the subject's functional, there are a few points where virtual memory can substantially peak:
I'm fairly sure this can be replaced by NiTransforms, though I don't know if that will help with the memory issue.
|
Using `wb_command -cifti-create-dense-from-template` would load all 4D ROIs into memory at once, causing a drastic bottleneck. Instead of creating a dtseries only to separate back into a volumetric NIfTI, we can simply add together the 4D ROIs and produce the same result, minimizing the number of files simultaneously loaded in memory'
Okay, the two concerns above have been addressed. I'd love to have another set of eyes look over this before merging it in |
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.
I haven't looked through the workflow in detail, yet, but here's some early comments. Do we have docs that will show the workflow graph?
nibabies/workflows/bold/alignment.py
Outdated
return rois[0], rois[1:], ("-add %s " * (len(rois) - 1)).strip() | ||
|
||
|
||
def merge_rois(in_files): |
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.
This feels like a significant enough function to write a test for. 3 (3,1,1,5)
time series would exercise it plenty, and easy to modify to hit each error condition.
nibabies/workflows/bold/alignment.py
Outdated
def format_volume_rois(structs, rois): | ||
"""Format volume arguments for CiftiCreateDenseFromTemplate.""" | ||
return [(struct, roi) for struct, roi in zip(structs, rois)] |
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.
I think this is unused. Also, it's just list(zip(structs, rois))
...
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.
Yep, remnant of the previous implementation
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
Co-authored-by: Chris Markiewicz <[email protected]>
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.
A few comments. It overall seems reasonable. A bit tough to be sure of the correctness without a comparison of subject with both workflows.
Thanks for the review @effigies! |
Closes #49.
A few missing pieces:
-volume-all
flag, so I'll probably just copy and build on it here.Once this standalone workflow is finalized (and somewhat tested), I'll open a separate PR actually using it in nibabies.