Fixed effects analysis with Cifti surface data

Summary of what happened:

I have effects sizes from my first level analysis of preprocessed input cifti data. In other words, I now have a cifti output file with the effects size for a given contrast for each run in my dataset (which corresponds to 91K array of data) and I want to do a fixed-effects analysis to combine runs per subject/task/session before group analysis.

nilearn compute_fixed_effects (nilearn.glm.compute_fixed_effects - Nilearn) does not accept CIFTI data

I found the below example through this neurostars post (GLM on surface data in NiLearn - #6 by bthirion) but it uses Gifti so I was going to do modifications, but if someone already had code that would help a ton!

Hey, @rahul-brito. Here’s our solution in FitLins for handling NIfTI and CIFTI-2:

1 Like

Thank you!!! I will check that out:)

Thanks again @effigies. Is there also a fitlins implementation for random effects models with cifti? I couldn’t find that. Thank you!

The random effects model is just the GLM.

1 Like

Sorry, really stupid follow-up question. How do I use this? As far as I can tell, the main way to install fitlins is through a singularity/docker container. If I want to integrate this into my current pipeline, I am naively unsure how (without cloning the whole repo?)

I would probably just copy these lines. It’s not really split into useful functions for importing.

If there is something from fitlins you do want to use, you can just pip install fitlins into the environment you’re working in and then import fitlins in your script. It doesn’t really require Docker. That’s just a way to bundle FSL and other non-Python dependencies. If you’re only using nilearn bits, a conda environment is as good as a Docker image and less cumbersome.

1 Like

Awesome that’s what I will do. Usually that feels “wrong” to do so I try to go the importing route, but makes sense its not always the universal solution.

Thank you!