ln2t / cvrmap

CVRmap - A Bids App to compute Cerebrovascular Maps from fMRI data
GNU Affero General Public License v3.0
2 stars 1 forks source link

IndexError: list index out of range #5

Open JiyangJiang opened 1 day ago

JiyangJiang commented 1 day ago

Dear CVRmap developers,

We collected some CO2-challenged BOLD images for CVR, and processed them with FMRIPrep with --use-aroma. When trying to run CVRmap, the following error was encountered.

fmriprep_output_dir=${BIDS_dir}/derivatives/fmriprep_${fmriprep_version}
cvrmap_version=2.0.25

singularity run --cleanenv \
                 -B ${BIDS_dir}:/rawdata \
                 -B ${BIDS_dir}/derivatives:/derivatives \
                 -B ${fmriprep_output_dir}:/fmriprep_output \
                 /path/to/cvrmap.sif \
                 /rawdata \
                 /derivatives/cvrmap-${cvrmap_version} \
                 --participant_label ${subject_ID} \
                 --skip_bids_validator \
                 --fmriprep_dir /fmriprep_output \
                 --task co2 \
                 participant

INFO (2024-12-03-08-32-56) Version: 2.0.25
INFO (2024-12-03-08-32-56) Indexing BIDS dataset...
INFO (2024-12-03-08-32-58) Defaulting to space MNI152NLin2009cAsym
INFO (2024-12-03-08-32-58) Bids directory: /rawdata
INFO (2024-12-03-08-32-58) Fmriprep directory: /fmriprep_output
INFO (2024-12-03-08-32-58) Subject(s) to analyse: ['vci016']
INFO (2024-12-03-08-32-58) Task to analyse: co2
INFO (2024-12-03-08-32-58) Selected space: MNI152NLin2009cAsym
INFO (2024-12-03-08-32-58) Running for participant vci016
Traceback (most recent call last):
  File "/usr/local/bin/cvrmap", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/local/lib/python3.11/site-packages/cvrmap/cvrmap.py", line 69, in main
    preproc, mni_preproc = get_preproc(basic_filter, layout)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/cvrmap/utils/io_tools.py", line 552, in get_preproc
    preproc.bids_load(layout, _basic_filter, 'bold')
  File "/usr/local/lib/python3.11/site-packages/cvrmap/utils/processing.py", line 59, in bids_load
    json_path = layout.get(**filters, extension='json')[0]
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

I wonder if you have any suggestions or insights on this?

Many thanks, Jiyang

arovai commented 20 hours ago

Hello! It seems CVRmap is struggling to find the JSON file of the preprocessed data. Please make sure that subject vci016 has been correctly preprocessed, with task co2 and space MNI152NLin2009cAsym. If you can provide the output of ls ${fmriprep_output_dir}/sub-vci016/func that could also be helpful to check that the expected JSON file is in there along with other preprocessed data. Let me know how it goes!