Cannot initialize neurosynth database

Hello all,

I want to decode IC maps with neurosynth and get relevant keywords for each map. However, I cannot initialize neurosynth dataset. I am following the code here (which is the same in many other tutorials): https://github.com/neurosynth/neurosynth/blob/master/examples/create_a_new_dataset_and_load_features.py

I downloaded the “database.txt” and “features.txt” files from neurosynth’s repository.

However, when I run dataset = Dataset('database.txt') command, I receive the following error:

ExpiredDeprecationError: get_header method is deprecated.
Please use the ``img.header`` property instead.

* deprecated from version: 2.1
* Raises <class 'nibabel.deprecator.ExpiredDeprecationError'> as of version: 4.0

I tried to find a workaround but I cannot load the dataset in another way. I tried changing the deprecated command in the script with the suggested one, but it did not work.

Is there any other updated way to initialize the database that I am not aware of? I would also appreciate it if you could help me with the decoding method too.

Many thanks!

Hello,

Apologies for the delayed response.

Unfortunately, the neurosynth library is deprecated in favor of NiMare.
The error you are seeing is due to a mismatch between nibabel version and neurosynth. You may be able to get around this by downgrading nibabel.

I would instead suggest using NiMare.

Here is how you load Neurosynth into NiMARE: NiMARE: Neuroimaging Meta-Analysis Research Environment — NiMARE 0.2.1+0.g2b1c23a.dirty documentation

You can then use the the decoding module.

Are you trying to decode a discrete image (i.e. ROI) or a full statistical map?

Here is an example of discrete decoding: NiMARE: Neuroimaging Meta-Analysis Research Environment — NiMARE 0.2.1+0.g2b1c23a.dirty documentation

There is no example yet for continous decoding but it’s possible: NiMARE: Neuroimaging Meta-Analysis Research Environment — NiMARE 0.2.1+0.g2b1c23a.dirty documentation