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

Cannot be executed from subfolder #85

Open yarikoptic opened 5 months ago

yarikoptic commented 5 months ago

Relates to

I did not see options to specify where to output the *_wf folders with reports which were dumped into the root of the dataset (not the right place IMHO), so thought to run from subdirectory and point to the top as the root of the BIDS dataset, but bidsonym does not work that way

(dev3) yoh@typhon:/data/yoh/1076_spacetop/derivatives/bidsonym-1$ ls -l $PWD/../..
total 76
-rw-r--r-- 1 yoh yoh  364 May 21 10:35 CHANGES
drwxr-xr-x 1 yoh yoh  626 Jun 12 16:49 code
-rw-r--r-- 1 yoh yoh  755 Jun 12 16:49 dataset_description.json
drwxr-xr-x 1 yoh yoh   60 Jun 13 12:25 derivatives
-rw-r--r-- 1 yoh yoh  405 May 21 10:35 participants.json
-rw-r--r-- 1 yoh yoh   73 Jun 12 16:49 participants.tsv
-rw-r--r-- 1 yoh yoh  138 May 21 10:35 README
drwxr-xr-x 1 yoh yoh   54 Jun 13 12:25 sourcedata
drwxr-xr-x 1 yoh yoh   48 May 21 10:35 sub-0001
drwxr-xr-x 1 yoh yoh   48 May 21 10:35 sub-0133
-rw-r--r-- 1 yoh yoh 1807 May 21 10:35 task-alignvideo_acq-mb8_bold.json
-rw-r--r-- 1 yoh yoh 1949 May 21 10:35 task-faces_acq-mb8_bold.json
-rw-r--r-- 1 yoh yoh 1954 May 21 10:35 task-fractional_acq-mb8_bold.json
-rw-r--r-- 1 yoh yoh 2638 Jun 12 16:49 task-learnining_acq-mb8_bold.json
-rw-r--r-- 1 yoh yoh 5463 May 29 13:47 task-memory_events.json
-rw-r--r-- 1 yoh yoh 1954 May 21 10:35 task-narratives_acq-mb8_bold.json
-rw-r--r-- 1 yoh yoh 4833 May 29 13:47 task-posner_events.json
-rw-r--r-- 1 yoh yoh 2079 May 21 10:35 task-shortvideo_acq-mb8_bold.json
-rw-r--r-- 1 yoh yoh 1803 May 21 10:35 task-social_acq-mb8_bold.json
-rw-r--r-- 1 yoh yoh 3532 May 29 13:47 task-tomsaxe_events.json
-rw-r--r-- 1 yoh yoh 4184 May 29 13:47 task-tomspunt_events.json
(dev3) yoh@typhon:/data/yoh/1076_spacetop/derivatives/bidsonym-1$ git clean -dfx; git reset --hard ; docker run -it --user $(id -u):$(id -g) -v $PWD:$PWD -w $PWD    bidsonym:local $PWD/../..  participant --deid mridefacer  --brainextraction bet --bet_frac 0.5 --skip_bids_validation --participant_label 0001 0133
Refusing to remove current working directory
HEAD is now at 1271716430 [DATALAD RUNCMD] Doing trial run with bleeding edge 0.0.5
Input data will not be checked for BIDS compliance.
Traceback (most recent call last):
  File "/opt/miniconda-latest/bin/bidsonym", line 33, in <module>
    sys.exit(load_entry_point('bidsonym', 'console_scripts', 'bidsonym')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/bidsonym-src/bidsonym/run_deeid.py", line 99, in run_deeid
    layout = BIDSLayout(args.bids_dir)
             ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda-latest/lib/python3.11/site-packages/bids/layout/layout.py", line 135, in __init__
    root, description = validate_root(root, validate)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda-latest/lib/python3.11/site-packages/bids/layout/validation.py", line 75, in validate_root
    raise BIDSValidationError(
bids.exceptions.BIDSValidationError: 'dataset_description.json' is missing from project root. Every valid BIDS dataset must have this file.
Example contents of 'dataset_description.json':
{"Name": "Example dataset", "BIDSVersion": "1.0.2"}