-
Notifications
You must be signed in to change notification settings - Fork 298
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 filtering for ANY or NONE in --bids-filter-file
#2123
ENH: Enable filtering for ANY or NONE in --bids-filter-file
#2123
Conversation
Thank your for raising your pull request. Some of the fMRIPRep maintainers will review your changes as soon as time permits. PR ReviewPlease check off boxes as applicable, and elaborate in comments below. Your review is not limited to these topics, as described in the reviewer guide
Please check what applies in the following aspects of the PR: Code documentation
Documentation site
Tests
Data
Dependencies: smriprep
Dependencies: niworkflows
Dependencies: sdcflows
Dependencies: Nipype
Dependencies: other
Reports generated within CI tests
|
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.
So ANY should be added, but null
should already work fine. Do you have evidence that it doesn't?
fmriprep/cli/parser.py
Outdated
import bids | ||
for k, v in dct.items(): | ||
if v is None: | ||
dct[k] = bids.layout.Query.NONE |
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.
PyBIDS should already treat None
like Query.None
.
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.
Weird, I tried and it did not, and now it does.
Maybe my sleep deprived brain is just making a lot of typos. :/
I will remove it.
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
Co-authored-by: Chris Markiewicz <effigies@gmail.com>
--bids-filter-file
Changes proposed in this pull request
When loading from
bids-filter-file
from json the pybids query values NONE and ANY cannot be used (cannot be serialized).Here is a quick fix for that problem, will need to be pushed to smriprep as well, and tested.
json
null
is converted to bids.layout.Query.NONEjson string
'__any__'
is converted to bids.layout.Query.ANY (could change the naming if we prefer'*'
but it usually means anything including empty, maybe'+'
then ?)Documentation that should be reviewed
The FAQ section on how to select images when multiple one available.