Nilearn signal length error

Hi, I’m wondering why I would be getting this error: ValueError: Confound signal has an incorrect lengthSignal length: 150; confound length: 96 when running this:

http://nilearn.github.io/auto_examples/03_connectivity/plot_probabilistic_atlas_extraction.html#sphx-glr-download-auto-examples-03-connectivity-plot-probabilistic-atlas-extraction-py

I understand the error (my .tsv is 96 rows and the example data is (168, 39) but I don’t know how to run the pipeline with my data. I ran standard fmriprep with --use-aroma.

Hi Ryan,

Instead of loading the example data, load your preprocessed bold image (corresponding to your confounds TSV file) with nilearn.image.load_img($PATH_TO_BOLD), and pass that into masker.fit_transform instead of the example data. The rest, assuming you are using the same atlases and plotting outputs as the tutorial, should be the same. Hope this helps.

Best,
Steven

1 Like