Pb Chimpanzee data application
Command used : singularity run -e khanlab_hippunfold_1.5.1.sif TryChimpanzeedata OutputTestFolder participant --modality T1w --cores 20 --rigid-reg-template --skip-inject-template-labels
Error message :
Config file config/snakebids.yml is extended by additional config specified via the command line. Building DAG of jobs... Using shell: /bin/bash Provided cores: 20 Rules claiming more threads will be scaled down. Singularity containers: ignored Job stats: job count
affine_gii_to_native 6 all 1 archive_work_after_final 1 calculate_curvature_from_surface1 2 calculate_curvature_from_surface2 2 calculate_gyrification1 2 calculate_gyrification2 2 calculate_surface_area1 2 calculate_surface_area2 2 calculate_thickness_from_surface1 2 calculate_thickness_from_surface2 2 combine_tissue_subfield_labels_corobl 2 compose_warps_native_to_unfold 2 compose_warps_unfold_to_crop_native 2 correct_nan_vertices1 6 correct_nan_vertices2 6 cp_unfolded_noconstrain 2 create_dscalar_metric_cifti 3 create_native_coord_ref 2 create_native_crop_ref 2 create_spec_file_hipp 2 create_warps_hipp 2 equivolume_coords 2 expand_unfolded_warps 4 get_subfield_vols_subj 1 label_subfields_from_vol_coords_corobl 2 laplace_coords_hipp 6 merge_lr_spec_file 1 metric_to_nii 6 normalize_curvature1 2 normalize_curvature2 2 plot_subj_subfields 1 qc_subfield 2 qc_subfield_surf 2 resample_coords_native_crop 8 resample_native_to_crop 2 resample_subfields_native_crop 2 resample_subfields_to_native 2 resample_unfoldreg_subfields 2 unfolded_registration 2 warp_gii_unfold2corobl1 6 warp_gii_unfold2corobl2 6 warp_gii_unfoldreg 6 total 122
Select jobs to execute...
[Tue Mar 18 15:48:37 2025] rule laplace_coords_hipp: input: work/sub-Jimmy/anat/sub-Jimmy_hemi-L_space-corobl_desc-nnunet_dseg.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-PD_hemi-L_space-corobl_label-hipp_desc-laplace_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-PD_hemi-L_laplace-hipp.txt jobid: 24 reason: Missing output files: work/sub-Jimmy/coords/sub-Jimmy_dir-PD_hemi-L_space-corobl_label-hipp_desc-laplace_coords.nii.gz wildcards: subject=Jimmy, dir=PD, hemi=L resources: tmpdir=/tmp, time=30
[Tue Mar 18 15:48:37 2025] rule laplace_coords_hipp: input: work/sub-Jimmy/anat/sub-Jimmy_hemi-R_space-corobl_desc-nnunet_dseg.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-AP_hemi-R_space-corobl_label-hipp_desc-laplace_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-AP_hemi-R_laplace-hipp.txt jobid: 79 reason: Missing output files: work/sub-Jimmy/coords/sub-Jimmy_dir-AP_hemi-R_space-corobl_label-hipp_desc-laplace_coords.nii.gz wildcards: subject=Jimmy, dir=AP, hemi=R resources: tmpdir=/tmp, time=30
[Tue Mar 18 15:48:37 2025] rule laplace_coords_hipp: input: work/sub-Jimmy/anat/sub-Jimmy_hemi-L_space-corobl_desc-nnunet_dseg.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-L_space-corobl_label-hipp_desc-laplace_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-IO_hemi-L_laplace-hipp.txt jobid: 149 reason: Missing output files: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-L_space-corobl_label-hipp_desc-laplace_coords.nii.gz wildcards: subject=Jimmy, dir=IO, hemi=L resources: tmpdir=/tmp, time=30
[Tue Mar 18 15:48:37 2025] rule equivolume_coords: input: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_desc-all_mask.nii.gz, work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_desc-SRLM_mask.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_label-hipp_desc-equivol_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-IO_hemi-R_equivolume.txt jobid: 83 reason: Missing output files: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_label-hipp_desc-equivol_coords.nii.gz wildcards: subject=Jimmy, dir=IO, hemi=R resources: tmpdir=/tmp, time=30
[Tue Mar 18 15:48:37 2025] rule laplace_coords_hipp: input: work/sub-Jimmy/anat/sub-Jimmy_hemi-R_space-corobl_desc-nnunet_dseg.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_label-hipp_desc-laplace_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-IO_hemi-R_laplace-hipp.txt jobid: 151 reason: Missing output files: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_label-hipp_desc-laplace_coords.nii.gz wildcards: subject=Jimmy, dir=IO, hemi=R resources: tmpdir=/tmp, time=30
[Tue Mar 18 15:48:37 2025] rule equivolume_coords: input: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-L_space-corobl_desc-all_mask.nii.gz, work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-L_space-corobl_desc-SRLM_mask.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-L_space-corobl_label-hipp_desc-equivol_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-IO_hemi-L_equivolume.txt jobid: 25 reason: Missing output files: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-L_space-corobl_label-hipp_desc-equivol_coords.nii.gz wildcards: subject=Jimmy, dir=IO, hemi=L resources: tmpdir=/tmp, time=30
[Tue Mar 18 15:48:37 2025] rule laplace_coords_hipp: input: work/sub-Jimmy/anat/sub-Jimmy_hemi-L_space-corobl_desc-nnunet_dseg.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-AP_hemi-L_space-corobl_label-hipp_desc-laplace_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-AP_hemi-L_laplace-hipp.txt jobid: 12 reason: Missing output files: work/sub-Jimmy/coords/sub-Jimmy_dir-AP_hemi-L_space-corobl_label-hipp_desc-laplace_coords.nii.gz wildcards: subject=Jimmy, dir=AP, hemi=L resources: tmpdir=/tmp, time=30
[Tue Mar 18 15:48:37 2025] rule laplace_coords_hipp: input: work/sub-Jimmy/anat/sub-Jimmy_hemi-R_space-corobl_desc-nnunet_dseg.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-PD_hemi-R_space-corobl_label-hipp_desc-laplace_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-PD_hemi-R_laplace-hipp.txt jobid: 82 reason: Missing output files: work/sub-Jimmy/coords/sub-Jimmy_dir-PD_hemi-R_space-corobl_label-hipp_desc-laplace_coords.nii.gz wildcards: subject=Jimmy, dir=PD, hemi=R resources: tmpdir=/tmp, time=30
/opt/conda/lib/python3.9/site-packages/scipy/init.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.26.0
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
/opt/conda/lib/python3.9/site-packages/scipy/init.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.26.0
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
/opt/conda/lib/python3.9/site-packages/scipy/init.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.26.0
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
/opt/conda/lib/python3.9/site-packages/scipy/init.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.26.0
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
/opt/conda/lib/python3.9/site-packages/scipy/init.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.26.0
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
/opt/conda/lib/python3.9/site-packages/scipy/init.py:146: UserWarning: A NumPy version >=1.16.5 and <1.23.0 is required for this version of SciPy (detected version 1.26.0
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
Traceback (most recent call last):
Traceback (most recent call last):
File "/data/pt_02101/Hippocampus/Try_hippunfold/MaeligTestFolder/.snakemake/scripts/tmpbi7_agqc.laplace_coords.py", line 8, in
[Tue Mar 18 15:48:38 2025] [Tue Mar 18 15:48:38 2025] Error in rule laplace_coords_hipp: jobid: 151 input: work/sub-Jimmy/anat/sub-Jimmy_hemi-R_space-corobl_desc-nnunet_dseg.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_label-hipp_desc-laplace_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-IO_hemi-R_laplace-hipp.txt (check log file(s) for error details)
Error in rule laplace_coords_hipp: jobid: 24 input: work/sub-Jimmy/anat/sub-Jimmy_hemi-L_space-corobl_desc-nnunet_dseg.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-PD_hemi-L_space-corobl_label-hipp_desc-laplace_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-PD_hemi-L_laplace-hipp.txt (check log file(s) for error details)
[Tue Mar 18 15:48:38 2025] Error in rule laplace_coords_hipp: jobid: 79 input: work/sub-Jimmy/anat/sub-Jimmy_hemi-R_space-corobl_desc-nnunet_dseg.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-AP_hemi-R_space-corobl_label-hipp_desc-laplace_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-AP_hemi-R_laplace-hipp.txt (check log file(s) for error details)
RuleException: CalledProcessError in file /opt/conda/lib/python3.9/site-packages/hippunfold/workflow/rules/autotop.smk, line 84: Command 'set -euo pipefail; /opt/conda/bin/python /data/pt_02101/Hippocampus/Try_hippunfold/MaeligTestFolder/.snakemake/scripts/tmpwlqp024h.laplace_coords.py' returned non-zero exit status 1. File "/opt/conda/lib/python3.9/site-packages/hippunfold/workflow/rules/autotop.smk", line 84, in __rule_laplace_coords_hipp File "/opt/conda/lib/python3.9/concurrent/futures/thread.py", line 52, in run RuleException: CalledProcessError in file /opt/conda/lib/python3.9/site-packages/hippunfold/workflow/rules/autotop.smk, line 84: Command 'set -euo pipefail; /opt/conda/bin/python /data/pt_02101/Hippocampus/Try_hippunfold/MaeligTestFolder/.snakemake/scripts/tmpbi7_agqc.laplace_coords.py' returned non-zero exit status 1. File "/opt/conda/lib/python3.9/site-packages/hippunfold/workflow/rules/autotop.smk", line 84, in __rule_laplace_coords_hipp File "/opt/conda/lib/python3.9/concurrent/futures/thread.py", line 52, in run RuleException: CalledProcessError in file /opt/conda/lib/python3.9/site-packages/hippunfold/workflow/rules/autotop.smk, line 84: Command 'set -euo pipefail; /opt/conda/bin/python /data/pt_02101/Hippocampus/Try_hippunfold/MaeligTestFolder/.snakemake/scripts/tmp8gp7sng2.laplace_coords.py' returned non-zero exit status 1. File "/opt/conda/lib/python3.9/site-packages/hippunfold/workflow/rules/autotop.smk", line 84, in __rule_laplace_coords_hipp File "/opt/conda/lib/python3.9/concurrent/futures/thread.py", line 52, in run [Tue Mar 18 15:48:38 2025] Error in rule laplace_coords_hipp: jobid: 12 input: work/sub-Jimmy/anat/sub-Jimmy_hemi-L_space-corobl_desc-nnunet_dseg.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-AP_hemi-L_space-corobl_label-hipp_desc-laplace_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-AP_hemi-L_laplace-hipp.txt (check log file(s) for error details)
RuleException: CalledProcessError in file /opt/conda/lib/python3.9/site-packages/hippunfold/workflow/rules/autotop.smk, line 84: Command 'set -euo pipefail; /opt/conda/bin/python /data/pt_02101/Hippocampus/Try_hippunfold/MaeligTestFolder/.snakemake/scripts/tmp6i9ei5j7.laplace_coords.py' returned non-zero exit status 1. File "/opt/conda/lib/python3.9/site-packages/hippunfold/workflow/rules/autotop.smk", line 84, in __rule_laplace_coords_hipp File "/opt/conda/lib/python3.9/concurrent/futures/thread.py", line 52, in run RuleException: CalledProcessError in file /opt/conda/lib/python3.9/site-packages/hippunfold/workflow/rules/autotop.smk, line 84: Command 'set -euo pipefail; /opt/conda/bin/python /data/pt_02101/Hippocampus/Try_hippunfold/MaeligTestFolder/.snakemake/scripts/tmph24aoyid.laplace_coords.py' returned non-zero exit status 1. File "/opt/conda/lib/python3.9/site-packages/hippunfold/workflow/rules/autotop.smk", line 84, in __rule_laplace_coords_hipp File "/opt/conda/lib/python3.9/concurrent/futures/thread.py", line 52, in run [Tue Mar 18 15:48:38 2025] Error in rule laplace_coords_hipp: jobid: 82 input: work/sub-Jimmy/anat/sub-Jimmy_hemi-R_space-corobl_desc-nnunet_dseg.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-PD_hemi-R_space-corobl_label-hipp_desc-laplace_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-PD_hemi-R_laplace-hipp.txt (check log file(s) for error details)
RuleException: CalledProcessError in file /opt/conda/lib/python3.9/site-packages/hippunfold/workflow/rules/autotop.smk, line 84: Command 'set -euo pipefail; /opt/conda/bin/python /data/pt_02101/Hippocampus/Try_hippunfold/MaeligTestFolder/.snakemake/scripts/tmprm5jlijt.laplace_coords.py' returned non-zero exit status 1. File "/opt/conda/lib/python3.9/site-packages/hippunfold/workflow/rules/autotop.smk", line 84, in __rule_laplace_coords_hipp File "/opt/conda/lib/python3.9/concurrent/futures/thread.py", line 52, in run [Tue Mar 18 15:48:44 2025] Error in rule equivolume_coords: jobid: 83 input: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_desc-all_mask.nii.gz, work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_desc-SRLM_mask.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_label-hipp_desc-equivol_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-IO_hemi-R_equivolume.txt (check log file(s) for error details) shell: python /opt/conda/lib/python3.9/site-packages/hippunfold/workflow/scripts/equivolume_coords.py /tmp work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_desc-SRLM_mask.nii.gz work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_desc-all_mask.nii.gz work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-R_space-corobl_label-hipp_desc-equivol_coords.nii.gz &> logs/sub-Jimmy/sub-Jimmy_dir-IO_hemi-R_equivolume.txt (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
[Tue Mar 18 15:48:44 2025] Error in rule equivolume_coords: jobid: 25 input: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-L_space-corobl_desc-all_mask.nii.gz, work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-L_space-corobl_desc-SRLM_mask.nii.gz output: work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-L_space-corobl_label-hipp_desc-equivol_coords.nii.gz log: logs/sub-Jimmy/sub-Jimmy_dir-IO_hemi-L_equivolume.txt (check log file(s) for error details) shell: python /opt/conda/lib/python3.9/site-packages/hippunfold/workflow/scripts/equivolume_coords.py /tmp work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-L_space-corobl_desc-SRLM_mask.nii.gz work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-L_space-corobl_desc-all_mask.nii.gz work/sub-Jimmy/coords/sub-Jimmy_dir-IO_hemi-L_space-corobl_label-hipp_desc-equivol_coords.nii.gz &> logs/sub-Jimmy/sub-Jimmy_dir-IO_hemi-L_equivolume.txt (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
Shutting down, this might take some time. Exiting because a job execution failed. Look above for error message Complete log: .snakemake/log/2025-03-18T154835.359670.snakemake.log
another quick note from our conversation today: we tried with & without template shape injection, the error is the same. There are likely two issues:
- the segmentation is not correct because we are using chimpanzee data here with a human (and also tried marmoset) nnunet/registration. But I dont think this would throw an error, just give bad results.
- this specific error message seems to be caused by an issue with
astropy. I wonder if we've accidentally broken our dependencies somewhere...
No, it looks like like the problem is stemming from the local python environment getting picked up and having conflicts:
File "/data/hu_chauvel/.local/lib/python3.9/site-packages/numpy/init.py", line 333, in getattr
My recommendation is to remove any python packages from your ~/.local/lib path (it is not recommended to put things there directly anyways).. you might be able to work around by altering your singularity bind paths too, but I would just suggest clearing it out (and using something like virtualenv, pipx or uvx for those things you had installed there..)
Yes it sounds like that should work, but I'm surprised that singularity includes ~/.local/lib in its path, since the singularity -e flag is being used. This makes me worry that singularity might not be quite as isolating as I'd hoped. I wonder if there's something we can include in the Dockerfile to avoid this issue?
Recall that the -e flag only clears the environment variables, ie it doesn't control what is on your filesystem. If python sees ~/.local/lib/ it tries to look for packages there..
Ie it is not coming from the environment variables but from the files on the filesystem
Seems like a quick fix would be to add PYTHONNOUSERSITE to the Dockerfile https://stackoverflow.com/questions/41360022/how-to-ignore-python-module-in-local-lib-python2-7-site-packages
ah didn't know about that env var -- yes can be set in the dockerfile -- ~note you would also have to set SINGULARITYENV_PYTHONNOUSERSITE (and for future-proofing maybe: APPTAINERENV_PYTHONNOUSERSITE)~ (nevermind that would only be for --use-singularity cases..)
just looping back so we can close this if possible -- did this correct the issue @MaeligChauvel ?
Hi,
I need to check what I can do on my side, please don't close it for now.
Best regards,
Maelig
De : Ali Khan @.> Envoyé : jeudi 17 avril 2025 14:30 À : khanlab/hippunfold @.> Cc : Maelig Chauvel @.>; Mention @.> Objet : Re: [khanlab/hippunfold] Pb Chimpanzee data application (Issue #400)
just looping back so we can close this if possible -- did this correct the issue @MaeligChauvelhttps://github.com/MaeligChauvel ?
— Reply to this email directly, view it on GitHubhttps://github.com/khanlab/hippunfold/issues/400#issuecomment-2813133761, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BI65DFMPAHUR4QTOBJ6RBTD2Z63J7AVCNFSM6AAAAABZIMF23OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJTGEZTGNZWGE. You are receiving this because you were mentioned.Message ID: @.***>
[https://avatars.githubusercontent.com/u/11492701?s=20&v=4]akhanf left a comment (khanlab/hippunfold#400)https://github.com/khanlab/hippunfold/issues/400#issuecomment-2813133761
just looping back so we can close this if possible -- did this correct the issue @MaeligChauvelhttps://github.com/MaeligChauvel ?
— Reply to this email directly, view it on GitHubhttps://github.com/khanlab/hippunfold/issues/400#issuecomment-2813133761, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BI65DFMPAHUR4QTOBJ6RBTD2Z63J7AVCNFSM6AAAAABZIMF23OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDQMJTGEZTGNZWGE. You are receiving this because you were mentioned.Message ID: @.***>