Skip to content
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

ENH: Enable resampling morphometrics to fsLR CIFTI-2 files #325

Merged
merged 3 commits into from
Mar 6, 2023

Conversation

effigies
Copy link
Member

Currently inaccessible to smriprep itself because I don't want to add and test a CLI option. Could probably go into a bug-fix release if someone cares about it before the next minor release.

@codecov-commenter
Copy link

codecov-commenter commented Feb 28, 2023

Codecov Report

Patch coverage: 50.40% and project coverage change: +39.38 🎉

Comparison is base (e1f4e3b) 26.68% compared to head (f3af1de) 66.07%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #325       +/-   ##
===========================================
+ Coverage   26.68%   66.07%   +39.38%     
===========================================
  Files          18       20        +2     
  Lines        1229     1353      +124     
  Branches      179      227       +48     
===========================================
+ Hits          328      894      +566     
+ Misses        888      398      -490     
- Partials       13       61       +48     
Flag Coverage Δ
ds005 54.10% <11.38%> (?)
ds054 45.01% <8.13%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
smriprep/workflows/base.py 80.00% <ø> (+50.00%) ⬆️
smriprep/workflows/outputs.py 61.90% <14.28%> (+49.48%) ⬆️
smriprep/workflows/anatomical.py 50.29% <20.00%> (+33.12%) ⬆️
smriprep/workflows/surfaces.py 68.87% <20.68%> (+56.67%) ⬆️
smriprep/interfaces/cifti.py 52.54% <52.54%> (ø)
smriprep/conftest.py 100.00% <100.00%> (ø)
smriprep/interfaces/freesurfer.py 60.00% <100.00%> (+33.26%) ⬆️
smriprep/__init__.py 100.00% <0.00%> (ø)
smriprep/utils/bids.py 47.00% <0.00%> (+5.12%) ⬆️
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@effigies
Copy link
Member Author

effigies commented Mar 1, 2023

@mgxd I would appreciate a review here. I'll fix the flake8 failure (unused import) just before merging. No need to cycle the CI for it.

Copy link
Collaborator

@mgxd mgxd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Very minor comments, otherwise looks good to me. It would be good to have @madisoth (or someone else working with CIFTI outputs) verify these outputs are similar to those generated from the wb_commands, to ensure we can be as 1:1 as possible.

smriprep/interfaces/cifti.py Outdated Show resolved Hide resolved
smriprep/workflows/surfaces.py Outdated Show resolved Hide resolved
Co-authored-by: Mathias Goncalves <goncalves.mathias@gmail.com>
@effigies
Copy link
Member Author

effigies commented Mar 2, 2023

@mgxd @madisoth Just sneaking the recon-all fix in here, rather than making a new PR.

Also remove false dependency from workflow step causing autorecon3 to
always retry -apas2aseg
@effigies
Copy link
Member Author

effigies commented Mar 3, 2023

@madisoth: You're probably running into this bug:

230303-14:00:55,586 nipype.workflow INFO:                                                                                                                                                                                                                     
         [Node] Executing "select_midthick" <nipype.interfaces.utility.base.Select>                                                                                                                                                                           
230303-14:00:55,588 nipype.workflow INFO:                                                                                                                                                                                                                     
         [Node] Finished "select_midthick", elapsed time 0.000265s.                                                                                                                                                                                           
230303-14:00:55,588 nipype.workflow WARNING:                                                                                   
         Storing result file without outputs                                                                                                                                                                                                                  
230303-14:00:55,588 nipype.workflow WARNING:                                                                                                                                                                                                                  
         [Node] Error on "fmriprep_23_0_wf.single_subject_01_wf.anat_preproc_wf.anat_ribbon_wf.select_midthick" (/scratch/fmriprep_23_0_wf/single_subject_01_wf/anat_preproc_wf/anat_ribbon_wf/select_midthick)                                               
230303-14:00:55,590 nipype.workflow ERROR:                                                                                                                                                                                                                    
         Node select_midthick failed to run on host 0e2f22be8776.                                                                                                                                                                                             
230303-14:00:55,590 nipype.workflow ERROR:                                                                                                                                                                                                                    
         Saving crash info to /out/sub-01/log/20230303-133746_ec8b0c21-aeca-4b28-acf1-5262714e1640/crash-20230303-140055-root-select_midthick-c36f3596-25d1-4908-95ef-76b05b799d1d.txt                                                                        
Traceback (most recent call last):                                                                                                                                                                                                                            
  File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/plugins/multiproc.py", line 344, in _send_procs_to_workers                                                                                                                                     
    self.procs[jobid].run(updatehash=updatehash)                                                                                                                                                                                                              
  File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 527, in run                                                                                                                                                             
    result = self._run_interface(execute=True)                                                                                                                                                                                                                
  File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 645, in _run_interface                                                                                                                                                  
    return self._run_command(execute)                                                                                          
  File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 771, in _run_command                                                                                                                                                    
    raise NodeExecutionError(msg)                                                                                                                                                                                                                             
nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node select_midthick.                                                                                                                                                       
                                                                                                                                                                                                                                                              
Traceback:                                                                                                                                                                                                                                                    
        Traceback (most recent call last):                                                                                                                                                                                                                    
          File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/core.py", line 401, in run                                                                                                                                                      
            outputs = self.aggregate_outputs(runtime)                                                                          
          File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/core.py", line 430, in aggregate_outputs                                                                                                                                        
            predicted_outputs = self._list_outputs()  # Predictions from _list_outputs                                                                                                                                                                        
          File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/utility/base.py", line 412, in _list_outputs                                                                                                                                         
            out = np.array(self.inputs.inlist, dtype=object)[                                                                                                                                                                                                 
        IndexError: index 6 is out of bounds for axis 0 with size 6  

The latest commit fixes that.

@effigies
Copy link
Member Author

effigies commented Mar 3, 2023

Just a note that I've now run through a downsampled test dataset successfully including this and the three open PRs on fMRIPrep. Rerunning now with full res ds005/sub-01 from scratch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants