Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use on a functional scan where "run" isn't specified #4

Open
sheyn-uw opened this issue Jul 29, 2022 · 0 comments
Open

How to use on a functional scan where "run" isn't specified #4

sheyn-uw opened this issue Jul 29, 2022 · 0 comments

Comments

@sheyn-uw
Copy link

This code seems super helpful - appreciate your work in it! Trying to run it on a task of mine that doesnt have a run specified in the naming conventions (there is only one)

When I run the script, I get

Traceback (most recent call last):
  File "denoise_fmriprep_output.py", line 235, in <module>
    curfunc.split('run-')[1].split('_')[0]  + '*' + '*space-MNI152NLin2009cAsym*brain*mask.nii*')[0]
IndexError: list index out of range

Presumably because there is no "run-" flags. When i tried to move through the script and edit/comment out any mentions of run, it still crashes, with an error I can't quite parse through.

Traceback (most recent call last):
  File "denoise_fmriprep_output.py", line 312, in <module>
    wmts = NiftiLabelsMasker(labels_img=tmpAROMAwm , detrend=False, standardize=False).fit_transform(tmpAROMA)
  File "/Volumes/conda/sheyn/envs/fmriprep_denoising/lib/python3.6/site-packages/nilearn/input_data/nifti_labels_masker.py", line 226, in fit_transform
    return self.fit().transform(imgs, confounds=confounds)
  File "/Volumes/conda/sheyn/envs/fmriprep_denoising/lib/python3.6/site-packages/nilearn/input_data/nifti_labels_masker.py", line 176, in fit
    self.labels_img_ = _utils.check_niimg_3d(self.labels_img)
  File "/Volumes/conda/sheyn/envs/fmriprep_denoising/lib/python3.6/site-packages/nilearn/_utils/niimg_conversions.py", line 316, in check_niimg_3d
    return check_niimg(niimg, ensure_ndim=3, dtype=dtype)
  File "/Volumes/conda/sheyn/envs/fmriprep_denoising/lib/python3.6/site-packages/nilearn/_utils/niimg_conversions.py", line 251, in check_niimg
    raise ValueError("File not found: '%s'" % niimg)
ValueError: File not found: './tmpdir/sub-1018_se/tmpAROMA_task-vext_wm.nii.gz'

Any easy thoughts/ideas? Or should I go through all my subjects and add the run flag into all the names/outputs

Thanks in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant