Skip to content

Conversation

mgxd
Copy link
Collaborator

@mgxd mgxd commented Jan 5, 2022

Adds --derivatives flag to allow for the use of precomputed derivatives (organized as one or more BIDS derivatives)

Initial support is intended to allow the use of:

  • anatomical segmentation
  • anatomical mask
  • bold mask (Pushed to a later PR, as this will require bigger workflow refactor than the other two options)

Addresses #166

@pep8speaks
Copy link

pep8speaks commented Jan 5, 2022

Hello @mgxd! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2022-01-24 21:19:32 UTC

@mgxd mgxd force-pushed the enh/derivatives branch from a966f22 to 532a4aa Compare January 6, 2022 00:04
@codecov-commenter
Copy link

codecov-commenter commented Jan 6, 2022

Codecov Report

Merging #173 (1ea4ad7) into master (41a793b) will decrease coverage by 0.33%.
The diff coverage is 7.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #173      +/-   ##
==========================================
- Coverage   32.54%   32.21%   -0.34%     
==========================================
  Files          44       44              
  Lines        3650     3703      +53     
==========================================
+ Hits         1188     1193       +5     
- Misses       2462     2510      +48     
Impacted Files Coverage Δ
nibabies/cli/parser.py 2.29% <0.00%> (-0.04%) ⬇️
nibabies/workflows/anatomical/base.py 7.14% <0.00%> (-1.56%) ⬇️
nibabies/workflows/base.py 11.62% <0.00%> (+0.51%) ⬆️
nibabies/workflows/anatomical/segmentation.py 16.66% <6.45%> (-3.01%) ⬇️
nibabies/utils/bids.py 20.17% <7.14%> (-1.83%) ⬇️
nibabies/workflows/anatomical/brain_extraction.py 8.33% <7.69%> (-0.11%) ⬇️
nibabies/config.py 56.65% <25.00%> (-0.49%) ⬇️
nibabies/workflows/bold/base.py 13.65% <50.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 41a793b...1ea4ad7. Read the comment docs.

@mgxd mgxd marked this pull request as ready for review January 6, 2022 14:44
Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

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

Haven't gone through the JLF stuff yet. Some initial reactions, though.

Comment on lines +216 to +223
coregistration_wf = init_coregistration_wf(
omp_nthreads=omp_nthreads,
sloppy=sloppy,
debug="registration" in config.execution.debug,
)
coreg_report_wf = init_coreg_report_wf(
output_dir=output_dir,
)
Copy link
Member

Choose a reason for hiding this comment

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

Do we not still need these, even if there is a mask?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

since the T2w is only being used to generate the mask, nope. I was actually planning on removing the T2w restriction if a precomputed mask is available.

Copy link
Member

Choose a reason for hiding this comment

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

Are we not outputting the coregistered T2w image? I think that's been a desired feature for fMRIPrep for a while, if it hasn't been explicitly brought up here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

no we are not (yet)

@mgxd mgxd mentioned this pull request Jan 18, 2022
@mgxd
Copy link
Collaborator Author

mgxd commented Jan 19, 2022

This is ready for a final review - @hough129 @madisoth how has testing gone on your end?

I'm working on a branch that implements session support and would like to get this big push in first.

@audreymhoughton
Copy link

I am still struggling to get it to fully complete - getting closer though. I believe @madisoth is having a separate issue that he reported on an issue thread.

@mgxd
Copy link
Collaborator Author

mgxd commented Jan 19, 2022

I am still struggling to get it to fully complete - getting closer though

Are you running into an error?

I believe @madisoth is having a separate issue that he reported on an issue thread.

Yes, though I believe its unrelated to this PR

@audreymhoughton
Copy link

Yes - but I have a fix - the segmentation needs to be reproduced in order to test it. That will take a day or two.

Copy link
Member

@effigies effigies left a comment

Choose a reason for hiding this comment

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

Overall this makes sense to me; I don't have the attention span to really check the connect statements in detail. Do we have a test case for all the major branches?

@mgxd
Copy link
Collaborator Author

mgxd commented Jan 24, 2022

Do we have a test case for all the major branches?

Not yet, but I'm hoping to beef up the test suite dramatically once this is in.

Co-authored-by: Chris Markiewicz <effigies@gmail.com>
@mgxd mgxd merged commit 7cdd0fe into nipreps:master Jan 24, 2022
@mgxd mgxd deleted the enh/derivatives branch January 24, 2022 21:38
@mgxd mgxd added this to the 22.0.0 milestone Jan 26, 2022
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.

5 participants