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

—infant results in pipeline flagging missing adult T1w QSIPrep outputs #124

Open
chiuhoward opened this issue Oct 17, 2024 · 1 comment · May be fixed by #126
Open

—infant results in pipeline flagging missing adult T1w QSIPrep outputs #124

chiuhoward opened this issue Oct 17, 2024 · 1 comment · May be fixed by #126

Comments

@chiuhoward
Copy link

Summary

I am trying to run qsirecon with the infant pipeline, but nipype.workflow flags the adult MNI anatomical outputs as missing.

I suspect it’s related to #44?

Additional details

  • QSIRecon version: 0.23.3.dev0+g7b29424.d20241016
  • Docker version:
  • Singularity version: apptainer version 1.3.2-1.el7

What were you trying to do?

Run qsirecon with one of the built-in reconstruction workflows.

What did you expect to happen?

QSIrecon to run, since

std_spaces=["MNIInfant" if config.workflow.infant else "MNI152NLin2009cAsym"],

suggests that there is a switch built in for —infant with the MNI Infant template.

What actually happened?

241017-15:24:19,696 nipype.workflow INFO:
	 found ['/scratch/groups/jyeatman/howard/DBPFullwT1derivOct24/sub-16001/dwi/sub-16001_acq-b700_dir-PA_space-T1w_desc-preproc_dwi.nii.gz'] in /scratch/groups/jyeatman/howard/DBPFullwT1derivOct24
241017-15:24:19,698 nipype.workflow INFO:
	 CHECKING /scratch/groups/jyeatman/howard/DBPFullwT1derivOct24/sub-16001/anat/sub-16001_desc-brain_mask.nii.gz: True
241017-15:24:19,698 nipype.workflow INFO:
	 CHECKING /scratch/groups/jyeatman/howard/DBPFullwT1derivOct24/sub-16001/anat/sub-16001_desc-preproc_T1w.nii.gz: True
241017-15:24:19,698 nipype.workflow INFO:
	 Found usable QSIPrep-preprocessed T1w image and mask.
241017-15:24:19,698 nipype.workflow INFO:
	 CHECKING /scratch/groups/jyeatman/howard/DBPFullwT1derivOct24/sub-16001/anat/sub-16001_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5: False
241017-15:24:19,698 nipype.workflow INFO:
	 CHECKING /scratch/groups/jyeatman/howard/DBPFullwT1derivOct24/sub-16001/anat/sub-16001_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5: False
241017-15:24:19,698 nipype.workflow INFO:
	 CHECKING /scratch/groups/jyeatman/howard/DBPFullwT1derivOct24/sub-16001/anat/sub-16001_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5: False
241017-15:24:19,698 nipype.workflow INFO:
	 CHECKING /scratch/groups/jyeatman/howard/DBPFullwT1derivOct24/sub-16001/anat/sub-16001_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5: False
241017-15:24:19,698 nipype.workflow INFO:
	 Missing T1w QSIPrep outputs: /scratch/groups/jyeatman/howard/DBPFullwT1derivOct24/sub-16001/anat/sub-16001_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5 /scratch/groups/jyeatman/howard/DBPFullwT1derivOct24/sub-16001/anat/sub-16001_from-MNI152NLin2009cAsym_to-T1w_mode-image_xfm.h5
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 139, in build_workflow
    retval["workflow"] = init_qsirecon_wf()
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/workflows/base.py", line 43, 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 130, in init_single_subject_recon_wf
    anat_ingress_node, available_anatomical_data = init_highres_recon_anatomical_wf(
  File "/opt/conda/envs/qsiprep/lib/python3.10/site-packages/qsirecon/workflows/recon/anatomical.py", line 87, in init_highres_recon_anatomical_wf
    raise Exception("Cannot compute to-template")
Exception: Cannot compute to-template

Reproducing the bug

export APPTAINERENV_FS_LICENSE=$GROUP_HOME/freesurferlicense.txt
singularity run --containall --writable-tmpfs --cleanenv \
/home/groups/jyeatman/software/singularity_images/qsirecon-0.23.2.sif \
/scratch/groups/jyeatman/howard/DBPFullwT1derivOct24 \
/scratch/groups/jyeatman/howard/DBPFullwT1derivOct24-recon/ participant --participant-label sub-$SLURM_ARRAY_TASK_ID \
-w /scratch/groups/jyeatman/howard/DBPFullwT1derivOct24-work \
--infant \
--recon-spec mrtrix_singleshell_ss3t_noACT \
--fs-license-file $GROUP_HOME/freesurferlicense.txt \
--nthreads 10 \
--omp-nthreads 8 \
--output-resolution 2 \
-v -v
@tsalo
Copy link
Member

tsalo commented Oct 18, 2024

AFAICT the infant_mode parameter is not being used in QSIPrepAnatomicalIngress, which is what actually collects the structural data, so even in infant mode it's looking for transforms to and from MNI152NLin2009cAsym. #123 will fix this, but I think we should push a fix ahead of time because that PR is massive.

@tsalo tsalo linked a pull request Oct 18, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

2 participants