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

Common MNE annotation names do not work with nilearn #420

Open
rob-luke opened this issue Dec 5, 2021 · 0 comments
Open

Common MNE annotation names do not work with nilearn #420

rob-luke opened this issue Dec 5, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@rob-luke
Copy link
Member

rob-luke commented Dec 5, 2021

Whats the problem?

Nilearn recently changed the requirements for design matrix column names in nilearn/nilearn#3025 which disallowed strings containing only numbers and strings with / as column names.

Getting rid of the numbers is no problem, I prefer meaningful annotation names anyway.

However, I think its common in MNE to use names like tapping/left or response/right. See https://mne.tools/dev/auto_tutorials/epochs/40_autogenerate_metadata.html?highlight=hed#keeping-only-the-first-events-of-a-group

But nilearn now requires that the column names pass the following test:

'response/right'.isidentifier()
# False

'response_right'.isidentifier()
# True

See lines: https://github.com/nilearn/nilearn/blob/ab9c68e502c4b92695cd658f5839a8207fd5e07e/nilearn/glm/first_level/hemodynamic_models.py#L428-L436

Solution

See #403 for an initial attempt at a fix. Other suggestions are welcome

@rob-luke rob-luke added the bug Something isn't working label Dec 5, 2021
@rob-luke rob-luke changed the title Not compatible with the latest development version of nilearn. Common MNE annotation names do not work with nilearn Jan 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant