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 14 forks source link

Deid not working #49

Closed araikes closed 3 years ago

araikes commented 3 years ago

Hi @PeerHerholz,

I tried deid'ing a dataset with the newest version of bidsonym and got the following error:

         [Node] Running "bet" ("nipype.interfaces.fsl.preprocess.BET"), a CommandLine Interface with command:
bet PTSD005/sourcedata/bidsonym/sub-/nifti/sub-PTSD005_ses-bline_run-002_T1w.nii.gz /tmp/tmpi6je2bvg/deface_wf/bet/sub-PTSD005_ses-bline_run-002_T1w_brain.nii.gz -f 0.50 -m
210409-16:48:56,925 nipype.interface INFO:
         stdout 2021-04-09T16:48:56.925441:
210409-16:48:56,926 nipype.interface INFO:
         stdout 2021-04-09T16:48:56.925441:Error: input image PTSD005/sourcedata/bidsonym/sub-/nifti/sub-PTSD005_ses-bline_run-002_T1w not valid

The issue is in the line referenced below: https://github.com/PeerHerholz/BIDSonym/blob/2f6e02f27cd25300938d6747335a2d915ce27802/bidsonym/run_deeid.py#L138

copy_no_deid is ordered bids_dir, subject_id, T1_file while the call here flips the subject_label and bids_dir arguments.

PeerHerholz commented 3 years ago

Hi @araikes,

thx a lot for reporting this, it indeed slipped through. I changed it via 177f447. However, I'm not sure if this is really what caused the error you're seeing during the bet workflow, as this part is done before the copy_no_deid function is called and independent of it. Could you maybe try it again via the docker image with the "latest" tag after the automated build finished in a few minutes?

araikes commented 3 years ago

Hi @PeerHerholz,

That solved it. No problems running it with the new auto build.

PeerHerholz commented 3 years ago

Hi @araikes,

ok cool, thanks for the update. I'll close this issue then.