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

Session-wise processing is not actually session-wise #908

Open
araikes opened this issue Jan 9, 2025 · 0 comments
Open

Session-wise processing is not actually session-wise #908

araikes opened this issue Jan 9, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@araikes
Copy link
Contributor

araikes commented Jan 9, 2025

Summary

In a multi-session dataset, running QSIPrep with --subject-anatomical-reference sessionwise does not correctly filter the dataset, resulting in duplicate processing and non-session-specifc outputs

Additional details

  • QSIPrep version: 1.0.0rc2.dev12+g716aac4.d20241211
  • Apptainer version: 1.3.2.-1.el7

What were you trying to do?

Session-wise processing of a multi-session dataset.

What did you expect to happen?

I expected ses-01 to be processed with only the T1w, DWI, and reverse phase EPI from ses-01 and like for ses-02 to only process files from that session.

What actually happened?

Within the work directory, two top level folders were created, as expected sub-001_ses-01_wf and sub-001_ses-02_wf.

Several things happened that were not as expected. sub-001_ses-01_wf will be used as the exemplar but it is identically applicable to the other top level workflow folder.

  1. Instead of only processing the ses-01 T1w image, the unbiased reference work flow was run, such that what should have been the session-specific preprocessed image was instead an unbiased average image of multiple sessions.
  2. The DWI files from both ses-01 and ses-02 were processed in parallel without merging, whereas this workflow should only have processed ses-01 while ses-02 was processed in sub-001_ses-02_wf. This has the effect of duplicating all of the processing steps.

The output DWI files appeared to be correct (correct file names, no duplication or sessions in unexpected locations), but it wasn't clear which files were ultimately being written from the workflows to the output.

Including a bids-filter-file to limit session selection along with specifying --session-id appears to correct this. Only specifying --session-id replicates this behavior but only generates the specified top-level workflow. Thus if --session-id 01 is passed, then all of the issues are still present but sub-001_ses-02_wf was not created.

Reproducing the bug

Initial call:

apptainer run --nv \
--containall \
-B /xdisk/adamraikes/PD_allo/nifti:/nifti:ro \
-B /xdisk/adamraikes/PD_allo/derivatives/qsiprep_1.0.0rc2_redo:/xdisk/adamraikes/PD_allo/derivatives/qsiprep_1.0.0rc2_redo \
-B /xdisk/adamraikes/PD_allo/extra:/extra \
-B /groups/adamraikes/templateflow:/opt/templateflow \
-B /groups/adamraikes/license.txt:/license.txt \
-B /tmp:/tmp \
/groups/adamraikes/singularity_images/qsiprep_1.0.0rc2.sif \
/nifti /xdisk/adamraikes/PD_allo/derivatives/qsiprep_1.0.0rc2_redo participant \
--participant-label 001 \
--nthreads 24 --omp-nthreads 8 \
--output-resolution 1 \
--subject-anatomical-reference sessionwise \
--denoise-method patch2self \
--unringing-method rpg \
--eddy-config /extra/eddy_params_v2.json \
--fs-license-file /license.txt \
-w /xdisk/adamraikes/PD_allo/derivatives/qsiprep_1.0.0rc2_redo/scratch \
--skip-bids-validation -vv
@araikes araikes added the bug Something isn't working label Jan 9, 2025
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

1 participant