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

InstitutionAddress is not deleted #18

Closed hcp4715 closed 4 years ago

hcp4715 commented 4 years ago

Dear there,

I tested BIDSonym recently. My data has the following structure:

├── sub-001 │ ├── ses-d1 │ │ ├── anat │ │ │ ├── sub-001_ses-d1_T1w.json │ │ │ ├── sub-001_ses-d1_T1w.nii.gz │ │ │ ├── sub-001_ses-d1_T2w.json │ │ │ └── sub-001_ses-d1_T2w.nii.gz │ │ ├── dwi │ │ │ ├── sub-001_ses-d1_dwi.bval │ │ │ ├── sub-001_ses-d1_dwi.bvec │ │ │ ├── sub-001_ses-d1_dwi.json │ │ │ └── sub-001_ses-d1_dwi.nii.gz │ │ ├── fmap │ │ │ ├── sub-001_ses-d1_magnitude1.json │ │ │ ├── sub-001_ses-d1_magnitude1.nii.gz │ │ │ ├── sub-001_ses-d1_magnitude2.json │ │ │ ├── sub-001_ses-d1_magnitude2.nii.gz │ │ │ ├── sub-001_ses-d1_phasediff.json │ │ │ └── sub-001_ses-d1_phasediff.nii.gz │ │ ├── func │ │ │ ├── sub-001_ses-d1_task-exp_bold.json │ │ │ ├── sub-001_ses-d1_task-exp_bold.nii.gz │ │ │ ├── sub-001_ses-d1_task-exp_events.tsv │ │ │ ├── sub-001_ses-d1_task-fam_bold.json │ │ │ ├── sub-001_ses-d1_task-fam_bold.nii.gz │ │ │ ├── sub-001_ses-d1_task-fam_events.tsv │ │ │ ├── sub-001_ses-d1_task-rest_run-1_bold.json │ │ │ ├── sub-001_ses-d1_task-rest_run-1_bold.nii.gz │ │ │ ├── sub-001_ses-d1_task-rest_run-1_events.tsv │ │ │ ├── sub-001_ses-d1_task-rest_run-2_bold.json │ │ │ ├── sub-001_ses-d1_task-rest_run-2_bold.nii.gz │ │ │ └── sub-001_ses-d1_task-rest_run-2_events.tsv │ │ ├── sub-001_ses-d1_scans.json │ │ └── sub-001_ses-d1_scans.tsv

BIDSonym defaced the T1 images well, there are some issues related to deleting the "InstitutionAddress": (1), the InstitutionAddress information in 'sub-001_ses-d1_scans.json' was deleted, but for all the json files in the sub-folders, e.g., 'sub-001_ses-d1_task-rest_run-2_bold.json', the InstitutionAddress was still there. Is it because the files were locked? see https://neurostars.org/t/file-lock-of-heudicov-0-8-0-and-bidsonym/6801 (2), it created a new line "InstitutionAddress": "deleted_by_bidsonym" in the participants.json, whico is located in the root folder of my BIDS data folder. However, this new line is not part of BIDS and made my data structure failed the BIDS validation.

PeerHerholz commented 4 years ago

Ahoi hoi @hcp4715,

thank you very much for posting this issue. Before we go any further: could you maybe post the specific BIDSonym command you run?

hcp4715 commented 4 years ago

Hi, @PeerHerholz ,

Thanks for your response. Below is the command:

singularity run --cleanenv -B /home/hcp4715/Data/Nipy:/base \
    /home/hcp4715/images/bidsonym-lastest.simg \
    /base/BIDS/ group\
    --deid pydeface \
    --del_meta 'InstitutionAddress' 
PeerHerholz commented 4 years ago

Should be fixed via this commit.