How to run nirodents?

Hello

I just found out about the rodent version of fmriprep! This is amazing! Is it already fully functional and what is the best way to run nirodents on a windows system? Can I use a virtual linux machine or is there a docker image available?

Best,

Bruno

Hi Bruno -

My name is Eilidh, and I am one of the team working on fmriprep-rodents and NiRodents.

These are technically two separate (but overlapping) projects; NiRodents is a toolbox for rodent image processing, which contains artsBrainExtraction, our brain masking tool. On the other hand, we intend for fmriprep-rodents to be similar to the original fMRIprep, in that it will automate the processing of rodent MRI images using many different tools, including those available in NiRodents.

To answer your questions: NiRodents is currently functional, and we encourage people to help us test it out! fmriprep-rodents is currently a work-in-progress, but we hope that it will be available for wider testing very, very soon.

To run NiRodents on a windows system, we recommend using Docker and pulling the latest image from nipreps/nirodents. The default entrypoint of the docker image is to run artsBrainExtraction by default, using a command like:

docker run --rm -it -v /path/to/data:/data:ro -v /path/to/output:/out -v /path/to/templateflowcache:/templateflow -e TEMPLATEFLOW_HOME=/templateflow nipreps/nirodents:latest /data/sub-01_T2w.nii.gz -o /out/

or alternatively, running the tool from the bash command within the image:
docker run --entrypoint /bin/bash --rm -it -v /path/to/data:/data:ro -v /path/to/output:/out nipreps/nirodents:latest

and then at the bash prompt:

artsBrainExtraction /data/sub-01_T2w.nii.gz -o /out/

Let me know if you need any more help.

All the best,
Eilidh

Hi Eilidh,

Thank you so much for your fast response! I got nirodents running from within docker and with windows I used this code

docker run --rm -it -v C:\source\sub-01\anat\:/data:ro -v C:\target\:/out -v C:\source\templateflow:/templateflow -e TEMPLATEFLOW_HOME=/templateflow nipreps/nirodents:0.2.1 /data/sub-01_T2w.nii.gz -o /out/

When it ran the first time it gave me this message:

RuntimeError: An instance of template <tpl-Fischer344> with MR scheme 'T2w' could not be found

But it worked the second time! It took a while (15mins) to finish processing but ran through. However, in the end the images didn’t seem to fit the template quite as expected. I assume it’s because the template and input files do not have the same orientation. What orientation do I need for my input images and is there a specific tool you would recommend using together with artsBrainExtraction?

Thanks!
Best,
Bruno

Great news that you got it to run, though I’m sorry the results weren’t as expected.

The error you posted is an issue we were aware of - it’s related to the downloading of the template from templateflow, and happens after the first time templateflow is called when the template needs to be downloaded. It should be fixed in future versions because we have updated the version of templateflow included in the docker image.

artsBrainExtraction expects images in RAS+ orientation, and I know there are some discrepancies with this respect in the rodent imaging community. The best solution is to use a Nifti conversion software which will correctly identify these orientations. I recommend BrkRaw for Bruker scanners, which also generates the file names to be BIDS-compliant (which is also necessary to take advantage of all the features of NiRodents).

Hopefully, this will work for you going forward!

All the best,
Eilidh

MANAGED BY INCF