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

[BUG] If I have 2 runs of a task each in a different session and I select only one session (eg second one), preproc fails at coregistration #1209

Open
1 of 9 tasks
marcobarilari opened this issue Feb 22, 2024 · 4 comments
Assignees
Labels
bug 🐛 Something isn't working

Comments

@marcobarilari
Copy link
Collaborator

Is there an existing issue for this?

  • I have searched the existing issues

Operating system

  • Linux
  • Mac
  • Windows

Operating system version

No response

SPM 12 version

  • 7771
  • 7487
  • 7219

Platform

  • MATLAB
  • Octave

Platform version

No response

bidspm version

v3.1.0

bidspm branch / commit number

No response

Expected Behavior

To work with only 1 run even though 2 are present in the bids dataset

BIDS stats model

No response

Current Behavior & Error message

The batch is built in a way that expects 2 sessions at the coregistration level

Error:

21-Feb-2024 21:00:10 - Done    'Realign & Unwarp'
Dependency source available, but is missing required output.
Index exceeds matrix dimensions.
In item Other Images:
Dependency 1: Realign: Estimate & Reslice/Unwarp: Realigned Images (Sess 1) (out.sess(1).uwrfiles)
    '/Volumes/PAUL/datalad/analysis_high-res_BLAM_biMotion_localizers/outputs/derivatives/bidspm-preproc/sub-SC08/ses-02/func/usub-SC08_ses-02_task-auditoryLocalizer_run-02_part-mag_space-individual_desc-stc_bold.nii'


Dependency 2: Realign: Estimate & Reslice/Unwarp: Realigned Images (Sess 2) (out.sess(2).uwrfiles)
       sess: [1×1 struct]
    meanuwr: {'/Volumes/PAUL/datalad/analysis_high-res_BLAM_biMotion_localizers/outputs/derivatives/bidspm-preproc/sub-SC08/ses-02/func/meanusub-SC08_ses-02_task-auditoryLocalizer_run-02_part-mag_space-individual_desc-stc_bold.nii'}

Batch

here it is expecting 2 other images (2 runs but I selected only one through the session filter)

matlabbatch{3}.spm.spatial.coreg.estimate.other(1) = cfg_dep('Realign: Estimate & Reslice/Unwarp: Realigned Images (Sess 1)', substruct('.','val', '{}',{2}, '.','val', '{}',{1}, '.','val', '{}',{1}, '.','val', '{}',{1}), substruct('.','sess', '()',{1}, '.','uwrfiles'));
matlabbatch{3}.spm.spatial.coreg.estimate.other(2) = cfg_dep('Realign: Estimate & Reslice/Unwarp: Realigned Images (Sess 2)', substruct('.','val', '{}',{2}, '.','val', '{}',{1}, '.','val', '{}',{1}, '.','val', '{}',{1}), substruct('.','sess', '()',{2}, '.','uwrfiles'));

Anything else?

No rush, my workaround was to delete in raw the run I don't need (which is to discard anyway).

More pointers for solutions:

  • Have a filter for run
  • Be smarter that if a user select a session, metadata from other sessions are not considered in the batch
@marcobarilari marcobarilari added the bug 🐛 Something isn't working label Feb 22, 2024
Copy link

We found the following entry in the FAQ which you may find helpful:

Feel free to close this issue if you found an answer in the FAQ. Otherwise, please give us a little time to review.

This is an automated reply, generated by FAQtory

@Remi-Gau
Copy link
Contributor

does it also fail if you have 2 sessions but only select the first one?

@marcobarilari
Copy link
Collaborator Author

I don't know, I will give it a trial and let you know.

@marcobarilari marcobarilari self-assigned this Feb 22, 2024
@marcobarilari
Copy link
Collaborator Author

Getting back to this issue, did not try yet but it is on my to do

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants