Skip to content
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

Support null and * in lists in --bids-filter-file #3214

Closed
tsalo opened this issue Jan 25, 2024 · 2 comments · Fixed by #3215
Closed

Support null and * in lists in --bids-filter-file #3214

tsalo opened this issue Jan 25, 2024 · 2 comments · Fixed by #3215

Comments

@tsalo
Copy link
Collaborator

tsalo commented Jan 25, 2024

What would you like to see added in fMRIPrep?

At the moment, it looks like the --bids-filter-file won't convert null and * to Queries when they're in lists within the JSON.

Do you have any interest in helping implement the feature?

Yes

Additional information / screenshots

For example, the following won't work:

{
    "bold": {
        "task": ["rest"],
        "run": [null, "01", "02"],
    }
}
@mgxd
Copy link
Collaborator

mgxd commented Jan 25, 2024

Good catch - we should expand the custom decoding in

return {
k: bids.layout.Query.NONE if v is None else (bids.layout.Query.ANY if v == "*" else v)
for k, v in dct.items()
}

to expand lists (probably recursively)

@tsalo
Copy link
Collaborator Author

tsalo commented Jan 25, 2024

I'm adding the same thing to ASLPrep in PennLINC/aslprep#388, so I'm happy to copy it over to an fMRIPrep PR.

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 a pull request may close this issue.

2 participants