Week 9 Quiz - question 8

Hi all,

I have been working on the week 9 quiz using the online jupyterhub.
But when I copy/paste the following command:

run_first_all containers-run -s datalad --explicit fsl -o data/sub-01/anat/sub-01_T1w.nii.gz --output derivatives/first/sub-01/ -i L_Hipp,R_Hipp -n data/sub-01/anat/sub-01_T1w.nii.gz --input derivatives/first/sub-01/none -m none

I get the following error: bash: run_first_all: command not found

The other commands did work and if I look at my directory with ls -a I get the following output:
. … data .datalad derivatives .git .gitattributes .gitmodules

In the .datalad folder is a config file:

[datalad “dataset”]
id = 8f4bbb49-2287-46fe-bc1e-b4a04308f842
[datalad “containers.fsl”]
image = .datalad/environments/fsl/image
cmdexec = singularity exec --cleanenv {img} {cmd}

and environments/fsl directory with image file.

This suggests that the previous command worked: datalad containers-add fsl --url https://osf.io/epnxs/download --call-fmt “singularity exec --cleanenv {img} {cmd}”

Do you have any idea what the problem could be?

Thanks.

Kind regards,
Helene Hopman

The code mentioned above (which is mentioned in Question) is scrambled and needs to be put in correct order for it to work.

None

  • datalad containers-run -n fsl --explicit --input data/sub-01/anat/sub-01_T1w.nii.gz --output derivatives/first/sub-01/ run_first_all -i data/sub-01/anat/sub-01_T1w.nii.gz -o derivatives/first/sub-01/none -m none -s L_Hipp,R_Hipp

Fast

  • datalad containers-run -n fsl --explicit --input data/sub-01/anat/sub-01_T1w.nii.gz --output derivatives/first/sub-01/ run_first_all -i data/sub-01/anat/sub-01_T1w.nii.gz -o derivatives/first/sub-01/fast -m fast -s L_Hipp,R_Hipp

Thanks. I feel a bit stupid, but if I run that command I get the following output/error:

jovyan@44373dc96dd5:~/week9_analysis$ datalad containers-run -n fsl --explicit --input data/sub-01/anat/sub-01_T1w.nii.gz --output derivatives/first/sub-01/ run_first_all -i data/sub-01/anat/sub-01_T1w.nii.gz -o derivatives/first/sub-01/none -m none -s L_Hipp,R_Hipp
[INFO ] Making sure inputs are available (this may take some time)
[INFO ] == Command start (output follows) =====
Error: cannot find image data/sub-01/anat/sub-01_T1w.nii.gz
[INFO ] == Command exit (modification check follows) =====
[INFO ] The command had a non-zero exit code. If this is expected, you can save the changes with ‘datalad save -d . -r -F .git/COMMIT_EDITMSG’
CommandError: ‘singularity exec --cleanenv .datalad/environments/fsl/image run_first_all -i data/sub-01/anat/sub-01_T1w.nii.gz -o derivatives/first/sub-01/none -m none -s L_Hipp,R_Hipp’ failed with exitcode 1 under /home/jovyan/week9_analysis

Should I expect the non-zero exit code and save the changes with ‘datalad save -d . -r -F .git/COMMIT_EDITMSG’ or is there another problem that I missed?

Best,
Helene

From the ‘note’ part in the question -
’ If this is the case, you may need to unlock data/sub-01/anat/sub-01_T1w.nii.gz via (datalad unlock data/sub-01/anat/sub-01_T1w.nii.gz). and add --explicit to the datalad command.’

You may need to run datalad unlock data/sub-01/anat/sub-01_T1w.nii.gz before the ‘fast’ and ‘none’ commands to solve this issue.