PeerHerholz / BIDSonym

a BIDS app for pseudo-anonymization of neuroimaging data
https://peerherholz.github.io/BIDSonym/
BSD 3-Clause "New" or "Revised" License
51 stars 12 forks source link

bet fails to find data #36

Open yarikoptic opened 4 years ago

yarikoptic commented 4 years ago

Running following reproducible script (make it into a smoke test?! data is already defaced so either bidsonym should crash informing about that or at least should try to deface I guess):

#!/bin/bash

export PS4='> '
set -x
set -eu
cd "$(mktemp -d ${TMPDIR:-/tmp}/dl-XXXXXXX)"

datalad install ///openneuro/ds000003
cd ds000003
datalad install -d . -s ///repronim/containers .datalad/containers
echo 'deface_wf' > .gitignore   # should really be an option to bidsonym
git add .gitignore; git commit -m 'ignore deface_wf' .gitignore
datalad containers-run -n .datalad/containers/bids-bidsonym -i "sub-01/anat/*.nii.gz" -o "sub-01/anat/*.nii.gz" -m "defacing 01" . participant --participant_label 01 --deid mri_deface --brainextraction bet --bet_frac 0.5

note: you need singularity, datalad, and datalad-container extension

results in:

RuntimeError: Command:
bet sub-01/anat/sub-01_T1w.nii.gz sourcedata/bidsonym/sub-01/sub-01_space-native_brainmask.nii.gz -f 0.50 -m
Standard output:

Error: input image sub-01/anat/sub-01_T1w not valid

running that command within bidsonym singularity container directly seems to work

(git)smaug:~/.tmp/dl-0kBZ3h2/ds000003[master]
$> singularity exec .datalad/containers/images/bids/bids-bidsonym--0.0.2.sing bet sub-01/anat/sub-01_T1w.nii.gz sourcedata/bidsonym/sub-01/sub-01_space-native_brainmask.nii.gz -f 0.50 -m

$> echo $?
0

$> ls -ld sourcedata/bidsonym/sub-01/sub-01_space-native_brainmask.nii.gz
-rw-r--r-- 1 yoh yoh 1606851 Sep  1 13:41 sourcedata/bidsonym/sub-01/sub-01_space-native_brainmask.nii.gz

so I suspect it is something about workflow setup etc

PeerHerholz commented 3 years ago

Hi @yarikoptic,

could you maybe try this again with either the latest or container_tests image?