Download data from openeuro in BIDS format using Python API?


#1

Hey guys,

I’m currently developing a little Python package and I want to make some examples using openfMRI-data. Is there an easy way to download an openfMRI dataset (both raw and preprocessed parts) using at Python library or something?

Cheers,
Gilles


#2

Hey @Gilles_de_Hollander,

worry no more and meet your new best friend: DataLad!

DataLad not only allows you to versioning basically everything (of course also data) and
reproduce/rerun a complete analysis with just one command, but also includes a super powerful search engine, which you can use to query a huge amount of datasets (10 TB). Furthermore, you can use DataLad to directly download complete datasets or just certain files.

Here’s a great example from @miykael’s nipype tutorial.

HTH, best, Peer


#3

Hey @PeerHerholz,

This sounds great.

One devilish detail is that I want to make examples for my Python package in sphinx, using sphinx-gallery. In a perfect world, this would mean that I can run a Python script on any box (like a readthedocs.org server) and it will just work. (Like nilearn’s examples, e.g. here)

Anyone experience with this?

-Gilles