-
Notifications
You must be signed in to change notification settings - Fork 34
FIX: Add desc=preproc as filter when finding preproc BOLD files #204
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
Hello @adelavega, Thank you for updating! Cheers! There are no style issues detected in this Pull Request. 🍻 To test for issues locally, Comment last updated at 2019-12-11 22:03:14 UTC |
346ae50
to
ea92778
Compare
Tested, and neuroscout-cli models are running with this change. Not sure why this didn't come up before, but I think I hadn't rebuilt my fitlins image in a while, and maybe it was on a previous pybids version or something. Upgrading to 0.6.0 did it though. I guess bugfix release will be needed, ugh. |
I suspect it's because I only used |
Codecov Report
@@ Coverage Diff @@
## master #204 +/- ##
=======================================
Coverage 77.35% 77.35%
=======================================
Files 18 18
Lines 1042 1042
Branches 187 187
=======================================
Hits 806 806
- Misses 147 148 +1
+ Partials 89 88 -1
Continue to review full report at Codecov.
|
@@ -231,7 +231,7 @@ def _load_level1(self, runtime, analysis): | |||
TR = ents.pop('RepetitionTime', None) # Required field in seconds | |||
if TR is None: # But is unreliable (for now?) | |||
preproc_files = analysis.layout.get( | |||
extension=['.nii', '.nii.gz'], **ents) | |||
extension=['.nii', '.nii.gz'], desc='preproc', **ents) |
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.
Is there any chance ents
could already contain 'desc'
? If so, this is setting us up for an error.
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.
It doesn't, I checked. Makes sense because the entities are coming from the design matrix which doesn't have that key.
bold_file = layout.get(**selectors) | ||
|
||
if len(bold_file) == 0: | ||
raise FileNotFoundError( | ||
"Could not find BOLD file in {} with entities {}" | ||
"".format(self.inputs.bids_dir, selectors)) |
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.
What about layout.root
?
Yep, that's exactly what happened. |
I'm not too happy about |
What if we enable validation but package our own config that handles |
That's probably the best thing to do yeah |
Merging, hope that's allright. |
Related issue: bids-standard/pybids#557
Stems from having
validate=False
, which we only used to do when necessary, but now is applied across the whole master Layout