Browse Source

edit files for new structure and add participant ID list

Lennart Wittkuhn 3 years ago
parent
commit
0144fac2f5

+ 2 - 5
code/heudiconv/highspeed-heudiconv-anonymizer.py

@@ -4,7 +4,7 @@
 # ==============================================================================
 # SCRIPT: ANONYMIZE PARTICIPANT IDS DURING BIDS-CONVERSION WITH HEUDICONV
 # PROJECT: HIGHSPEED
-# WRITTEN BY LENNART WITTKUHN, 2018 - 2019
+# WRITTEN BY LENNART WITTKUHN, 2018 - 2020
 # CONTACT: WITTKUHN AT MPIB HYPHEN BERLIN DOT MPG DOT DE
 # MAX PLANCK RESEARCH GROUP NEUROCODE
 # MAX PLANCK INSTITUTE FOR HUMAN DEVELOPMENT
@@ -16,11 +16,8 @@ import sys
 import os
 # define paths depending on the operating systen:
 if 'linux' in sys.platform:
-    # define the root path:
-    #path_root = os.path.join("/home", "mpib", "wittkuhn", "highspeed")
-    #path_code = os.path.join(path_root, "highspeed_analysis", "code")
     # define the path to the text file containg the subject IDs:
-    path_sublist = os.path.join("/code", "parameters", "highspeed_participant_list.txt")
+    path_sublist = os.path.join("/code", "highspeed-participant-list.txt")
 # retrieve the user input:
 ids_orig = open(path_sublist, "r").read().splitlines()
 # define the number of subjects:

+ 11 - 12
code/heudiconv/highspeed-heudiconv-cluster.sh

@@ -14,16 +14,20 @@
 # DEFINE ALL PATHS:
 # ==============================================================================
 PATH_BASE="${HOME}"
+# path to the project root directory
+PATH_ROOT="${PATH_BASE}/highspeed"
 # define the name of the project:
-PROJECT_NAME="highspeed"
+PROJECT_NAME="highspeed-bids"
+# define the path to the project folder:
+PATH_PROJECT="${PATH_ROOT}/${PROJECT_NAME}"
 # define the path to the input directory:
-PATH_INPUT="${PATH_BASE}/${PROJECT_NAME}/rawdata/mri"
+PATH_INPUT="${PATH_PROJECT}/mri"
 # define the path to the output directory
-PATH_OUTPUT="${PATH_BASE}/${PROJECT_NAME}/bids"
+PATH_OUTPUT="${PATH_PROJECT}"
 # define the path to the singularity container:
-PATH_CONTAINER="${PATH_BASE}/tools/heudiconv/heudiconv_0.6.0.sif"
+PATH_CONTAINER="${PATH_PROJECT}/tools/heudiconv/heudiconv_0.6.0.sif"
 # define the path to the code main directory:
-PATH_CODE="${PATH_BASE}/${PROJECT_NAME}/${PROJECT_NAME}_analysis/code"
+PATH_CODE="${PATH_PROJECT}/code"
 # path to the heudiconv heuristic file:
 HEURISTIC_FILE="highspeed_heudiconv_heuristic.py"
 # define path to the python executable file that anonymizes the subject ids:
@@ -31,17 +35,12 @@ ANON_FILE="highspeed_heudiconv_anonymizer.py"
 # make the anonymizer file executable:
 chmod +x "${PATH_CODE}/heudiconv/$ANON_FILE"
 # path to the directory where error and out path_logs of cluster jobs are saved:
-PATH_LOGS="${PATH_BASE}/${PROJECT_NAME}/logs/heudiconv/$(date '+%Y%m%d_%H%M%S')"
+PATH_LOGS="${PATH_PROJECT}/logs/heudiconv/$(date '+%Y%m%d_%H%M%S')"
 # path to the text file with all subject ids:
-PATH_SUB_LIST="${PATH_CODE}/parameters/highspeed_participant_list.txt"
+PATH_SUB_LIST="${PATH_CODE}/highspeed-participant-list.txt"
 # ==============================================================================
 # CREATE RELEVANT DIRECTORIES:
 # ==============================================================================
-# create output directory:
-if [ ! -d ${PATH_OUTPUT} ]; then
-	mkdir -p ${PATH_OUTPUT}
-	echo "created ${PATH_OUTPUT}"
-fi
 # create directory for log files:
 if [ ! -d ${PATH_LOGS} ]; then
 	mkdir -p ${PATH_LOGS}

+ 40 - 0
code/heudiconv/highspeed-participant-list.txt

@@ -0,0 +1,40 @@
+31003
+41001
+41002
+41003
+41004
+41005
+41007
+41008
+41009
+41010
+41011
+41012
+41013
+41014
+41015
+41016
+41017
+41018
+41019
+41020
+41021
+41022
+41023
+41024
+41025
+41026
+41027
+41028
+41029
+41030
+41031
+41032
+41033
+41034
+41035
+41036
+41038
+41040
+41041
+41042