PennLINC / qsirecon

Reconstruction of preprocessed q-space images (dMRI)
https://qsirecon.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
5 stars 3 forks source link

[ENH] Handle session-specific anatomical data #148

Closed mattcieslak closed 1 week ago

mattcieslak commented 2 weeks ago

as of https://github.com/PennLINC/qsiprep/pull/832 anatomical data can be written out to session directories. QSIRecon should be able to find them and use them

araikes commented 2 weeks ago

This happens when using session-specific processing from qsiprep (--anat-space-definition session).

[adamraikes@r5u13n1 PD_allo]$ apptainer run --containall --writable-tmpfs -B /groups/adamraikes/templateflow:/opt/templateflow -B $PWD/derivatives/qsiprep_0.23.1:/input -B $PWD/derivatives/qsirecon_unstable_v3:/output -B /tmp:/tmp -B /groups/adamraikes/license.txt:/license.txt -B /groups/adamraikes/git_repos/qsirecon/qsirecon:/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon $RECON /input /output participant --participant_label 011 -w /output/scratch  --fs-license-file /license.txt --recon-spec TORTOISE --input-type qsiprep 
241105-09:43:00,74 nipype.workflow IMPORTANT:
     Running QSIRecon version 0+unknown

         License NOTICE ##################################################
         QSIRecon 0+unknown
         Copyright The PennLINC Developers.

         This product includes software developed by
         the NiPreps Community (https://nipreps.org/).

         Portions of this software were developed at the Department of
         Psychology at Stanford University, Stanford, CA, US.

         This software is also distributed as a Docker container image.
         The bootstrapping file for the image ("Dockerfile") is licensed
         under the MIT License.

         This software may be distributed through an add-on package called
         "Docker Wrapper" that is under the BSD 3-clause License.
         #################################################################
241105-09:43:00,447 nipype.workflow IMPORTANT:
     Building QSIRecon's workflow:
           * BIDS dataset path: /input.
           * Participant list: ['011'].
           * Run identifier: 20241105-094241_0963fb2e-7552-479d-8b94-a441e87fd6ad.
241105-09:43:05,616 nipype.workflow INFO:
     found ['/input/sub-011/ses-01/dwi/sub-011_ses-01_dir-AP_space-T1w_desc-preproc_dwi.nii.gz', '/input/sub-011/ses-02/dwi/sub-011_ses-02_dir-AP_space-T1w_desc-preproc_dwi.nii.gz'] in /input
Process Process-2:
Traceback (most recent call last):
  File "/opt/conda/envs/qsiprep/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/opt/conda/envs/qsiprep/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/cli/workflow.py", line 136, in build_workflow
    retval["workflow"] = init_qsirecon_wf()
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/workflows/base.py", line 44, in init_qsirecon_wf
    single_subject_wf = init_single_subject_recon_wf(subject_id=subject_id)
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/workflows/base.py", line 128, in init_single_subject_recon_wf
    anat_data, status = collect_anatomical_data(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/utils/bids.py", line 212, in collect_anatomical_data
    raise ValueError(
ValueError: More than one acpc_seg found.