Skip to content

Conversation

@oesteban
Copy link
Member

Supersedes (and largely based on) #1915.

Distinguish user-defined --output-spaces from internal intermediary steps

This PR ensures that spaces not requested (i.e. fsaverage5 when running with freesurfer, fsLR surfaces when using --cifti-output, etc) are not included in the final output.

To do so, it utilizes the recently added infrastructure for Spaces and SpatialReferences.

To avoid name collisions of the outputs, it uses a hack on our current DerivativesDataSinks. Those will need to be revised with the BIDS-Derivs spec because cohort and res appear at the end before the suffix (that's a side effect of the hack). But I guess this is better than not allowing it or rewriting silently.

@auto-comment
Copy link

auto-comment bot commented Jan 31, 2020

Thank your for raising your pull request.

Some of the fMRIPRep maintainers will review your changes as soon as time permits.
I'm attaching below a Review Checklist for the reviewers, to check off during the
review.

PR Review

Please check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide

  • As the reviewer I confirm that there are no conflicts of interest for me to review this work.

Please check what applies in the following aspects of the PR:

Code documentation

  • New functions and modules are documented following the guidelines.
  • Existing code required amendments in documentation and has been updated.
  • Sufficient inline comments ensure readability by other contributors in the long term.

Documentation site

  • The modifications to fMRIPrep in this PR do not require extra documentation. This is a common situation when a bug fix that does not change the code base substantially is submitted.
  • This PR requires documentation. The corresponding documentation will be submitted as an additional PR in the future.
  • This PR requires extra documentation, and will be included within this PR. Please check the boxes that apply best:
    • An existing feature is substantially modified, changing the interface and/or logic of a module.
    • A new feature is being added, therefore full documentation of it will be included
    • This PR addresses an error in existing documentation.
  • Yes, all expected sections of documentation were generated by the CI build, and look as expected

Tests

  • The new functionalities in this PR are covered by the existing tests
  • New test batteries have been included with this PR

Data

  • This PR does not require any additional data to be uploaded to OSF.
  • This PR requires additional data for tests.

Dependencies: smriprep

  • This PR does not require any update on smriprep; or
  • smriprep has correctly been pinned.

Dependencies: niworkflows

  • This PR does not require any update on niworkflows; or
  • niworkflows has correctly been pinned.

Dependencies: sdcflows

  • This PR does not require any update on sdcflows; or
  • sdcflows has correctly been pinned.

Dependencies: Nipype

  • This PR does not require any update on nipype; or
  • nipype has correctly been pinned.

Dependencies: other

  • This PR does not require any update on other dependencies; or
  • other dependencies have correctly been pinned.

Reports generated within CI tests

  • Yes, I have checked the reports of ds005 and they are not modified or the changes are as expected
  • Yes, I have checked the reports of ds054 and they are not modified or the changes are as expected
  • Yes, I have checked the reports of ds010 and they are not modified or the changes are as expected

@oesteban oesteban changed the title ENH: Refactor of how spatial normalization targets and --output-spaces are maintained WIP/ENH: Refactor of how spatial normalization targets and --output-spaces are maintained Jan 31, 2020
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.

Doc issues.

@pep8speaks
Copy link

pep8speaks commented Jan 31, 2020

Hello @oesteban! 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 2020-02-07 16:25:10 UTC

@oesteban oesteban force-pushed the patch/fix-outputs branch 3 times, most recently from 0875723 to 9d37a44 Compare February 4, 2020 01:31
@oesteban oesteban changed the title WIP/ENH: Refactor of how spatial normalization targets and --output-spaces are maintained ENH: Refactor of how spatial normalization targets and --output-spaces are maintained Feb 4, 2020
Copy link
Member Author

@oesteban oesteban left a comment

Choose a reason for hiding this comment

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

Okay, getting there - this is coming along.

@oesteban oesteban requested review from effigies and mgxd February 5, 2020 00:13
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.

Okay, this is coming together!

We'll have to add a brief line explaining only requested output spaces are produced here
https://github.com/poldracklab/fmriprep/blob/master/docs/outputs.rst#derivatives-of-fmriprep-preprocessed-data

I'll send a PR to your branch with some documentation updates

@oesteban
Copy link
Member Author

oesteban commented Feb 5, 2020

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.

4 participants