8000 ENH: Set loop_preproc during model loading by effigies · Pull Request #66 · poldracklab/fitlins · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Conversation

effigies
Copy link
Collaborator

This PR does a couple things.

  • Set loop_preproc config option in LoadBIDSModel interface, so that datasets missing original BOLD files can still run. This should make it a FitLins a little cheaper in IO terms, especially if working with DataLad datasets, that now do not need to get the originals.
  • Relegates bids imports to the insides of interfaces. This is somewhere between aesthetics and encapsulation. It should allow for the bids.config changes to be confined to a single interface, but I think that might depend on the nipype plugin whether that's the case.
  • Use bids.BIDSLayout and bids.Analysis rather than bids.grabbids.BIDSLayout and bids.analysis.Analysis. The former will help avoid the grabbids/layout organizational issue, and the latter is mostly for symmetry.

Closes #65.

@@ -159,6 +159,8 @@ class LoadBIDSModel(SimpleInterface):
output_spec = LoadBIDSModelOutputSpec

def _run_interface(self, runtime):
import bids
bids.config.set_options(loop_preproc=True)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@adelavega Does this look like the right place to do this? My understanding is the time to do it is before bids.Analysis().setup() is called. Are there any other cases where it's important to ensure this is set?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That seems right to me. The actual function that uses this is load_variables so as long as its done prior to that, it should work.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good. I'll go ahead and merge. If you have some time to test, we can see how badly I broke things for you with the workflow update, too.

@effigies effigies merged commit d19b4b1 into poldracklab:master Aug 13, 2018
@effigies effigies deleted the enh/config_preproc branch August 13, 2018 16:20
effigies added a commit that referenced this pull request Aug 24, 2018
This release moves FitLins to a Nipype workflow and provides a set of Nipype interfaces for interacting with BIDS Models and the nistats statistical package.

* FIX: Correctly handle missing confounds (#73)
* ENH: Set loop_preproc during model loading (#66)
* REF: Second-level workflow (#30)
* DOC: Example model (#63)
* MAINT: Update nipype, grabbit and pybids dependencies (#70)
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.

2 participants
0