Browse Source

resolve merge conflict in participants.json

Lennart Wittkuhn 3 years ago
parent
commit
3ee40cdaab

+ 33 - 7
code/bids_conversion/highspeed-bids-participants.py

@@ -26,13 +26,39 @@ path_desc = os.path.join(path_root, 'participants.json')
 # ======================================================================
 # update fields of the json file:
 json_desc = dict()
-json_desc["participant_id"] = "Participant identifier"
-json_desc["age"] = "Age, in years as in the first session"
-json_desc["sex"] = "Sex, self-rated by participant, m for male / f for female / o for other"
-json_desc["handedness"] = "Handedness, self-rated by participant; note that participants were required to be right-handed"
-json_desc["digit_span"] = "Total score in Digit-Span Test (Petermann & Wechsler, 2012), assessing working memory capacity"
-json_desc["randomization"] = "Pseudo-randomized group assignment for selection of sequences in sequence trials"
-json_desc["session_interval"] = "Interval in days between the two experimental sessions"
+json_desc["participant_id"] = {
+        "Description": "Participant identifier"
+        }
+json_desc["age"] = {
+        "Description": "Age, in years as in the first session",
+        "Units": "years"
+        }
+json_desc["sex"] = {
+        "Description": "Sex, self-rated by participant",
+        "Levels": {
+            "m": "male",
+            "f": "female",
+            "o": "other"
+            }
+        }
+json_desc["handedness"] = {
+        "Description": "Handedness, self-rated by participant; note that participants were required to be right-handed",
+        "Levels": {
+            "right": "right",
+            "left": "left"
+            }
+        }
+json_desc["digit_span"] = {
+        "Description": "Total score in Digit-Span Test (Petermann & Wechsler, 2012), assessing working memory capacity",
+        "Units": "total scores"
+        }
+json_desc["randomization"] = {
+        "Description": "Pseudo-randomized group assignment for selection of sequences in sequence trials"
+        }
+json_desc["session_interval"] = {
+        "Description:": "Interval in days between the two experimental sessions",
+        "Units": "days"
+        }
 # save updated data-set_description.json file:
 with open(path_desc, 'w') as outfile:
     json.dump(json_desc, outfile, indent=4)

+ 4 - 4
code/bids_conversion/highspeed-bids-validator.sh

@@ -16,8 +16,8 @@
 PATH_BASE="${HOME}"
 PROJECT="highspeed"
 PATH_CONTAINER="${PATH_BASE}/tools/bids_validator/validator_1.3.12.sif"
-PATH_INPUT="${PATH_BASE}/${PROJECT}/bids"
-PATH_OUTPUT="${PATH_BASE}/${PROJECT}/derivatives/bids_validator"
+PATH_INPUT="${PATH_BASE}/${PROJECT}/highspeed-bids"
+PATH_OUTPUT="${PATH_BASE}/tmp/bids_validator"
 # ==============================================================================
 # CREATE RELEVANT DIRECTORIES:
 # ==============================================================================
@@ -30,6 +30,6 @@ fi
 # RUN BIDS-VALIDATOR:
 # ==============================================================================
 # run bids-validator and save the output in a text file:
-singularity run -B ${PATH_INPUT}:/input:ro ${PATH_CONTAINER} /input/ | tee -a ${PATH_OUTPUT}/bids_validation.txt
+singularity run --contain -B ${PATH_INPUT}:/input:ro ${PATH_CONTAINER} /input/ | tee -a ${PATH_OUTPUT}/bids_validation.txt
 # run the bids-validator and save the output in a .json file:
-singularity run -B ${PATH_INPUT}:/input:ro ${PATH_CONTAINER} /input/ --json | tee -a ${PATH_OUTPUT}/bids_validation.json
+singularity run --contain -B ${PATH_INPUT}:/input:ro ${PATH_CONTAINER} /input/ --json | tee -a ${PATH_OUTPUT}/bids_validation.json