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

BIDSDataGrabber/pybids not working as expected #158

Open
loupl opened this issue Aug 6, 2020 · 1 comment
Open

BIDSDataGrabber/pybids not working as expected #158

loupl opened this issue Aug 6, 2020 · 1 comment

Comments

@loupl
Copy link

loupl commented Aug 6, 2020

Hi Michael,

first of all - thanks for these really helpful tutorials! I managed to translate a lot of what you describe into my particular use case.

Now I would like to scale things up a bit and use a BIDS directory to run an analysis workflow on a number of subjects. For this I tried to follow the relevant notebook (Data Input with BIDS) from your tutorial. However, it seems to be the case that this does not work. I copy-pasted the example code and applied it to both the example data (ds000114) and a small sample dataset of my own (also in BIDS format, validated with BIDS validator and also loads without issue into BIDSLayout from pybids). Here are the two things which don't work as shown in/to be expected from your tutorial:

  1. layout.get_modalities():
    This returns an empty list for both datasets rather than ['anat', 'dwi', 'func'] for ds000114 and ['anat'] for my own dataset.

  2. The small first BIDSDataGrabber example

     bg = Node(BIDSDataGrabber(), name='bids-grabber')`
     bg.inputs.base_dir = '/data/ds000114/'
     bg.inputs.subject = '1'
     res = bg.run()

throws an error: OSError: Output key: bold returned no files. This happens again for both ds000114 and my own dataset.

I'm running the docker image for the tutorials, the following versions of relevant packages seem to be installed in this:
pybids 0.7.1
nipype 1.5.0-rc1.post-dev

I tried creating a separate docker image with an earlier pybids version (0.6.5). Using this the layout.get_modalities() does not return an empty list any more, but other errors come up when trying to run the BIDSDataGrabber node, so I left it there for now.

Any advice/hints/guesses as to what might be causing these issues would be greatly appreciated.

@effigies
Copy link
Contributor

The BIDSDataGrabber is severely out-of-date as PyBIDS has had its API changed several times. It should probably be used as a rough model for how to write one of your own using a more recent version.

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

No branches or pull requests

2 participants