Forráskód Böngészése

handle only T1 files and does not print "processing subject" anymore

Lucas Backes 1 hónapja
szülő
commit
c922d7b84c
1 módosított fájl, 7 hozzáadás és 5 törlés
  1. 7 5
      get_brainage.sh

+ 7 - 5
get_brainage.sh

@@ -27,8 +27,9 @@ while [[ "$#" -gt 0 ]]; do
         -RAW) RAW="$2"; shift ;;
         -RUN_FILE) RUN_SINGULARITY_FILE="$2"; shift ;;
         -SAVE_FILE) SAVE="$2"; shift ;;
+        -CONTAINER_PATH) CONTAINER_PATH="$2"; shift ;;
         -help)
-            echo "Usage: $0 -input <input_dir> -output <output_dir> -BIDS <yes/no> -CONDOR <yes/no> -RAW <yes/no> -RUN_FILE <path> -SAVE_FILE <yes/no>"
+            echo "Usage: $0 -input <input_dir> -output <output_dir> -BIDS <yes/no> -CONDOR <yes/no> -RAW <yes/no> -RUN_FILE <path> -SAVE_FILE <yes/no> -CONTAINER_PATH <path>"
             exit 0
             ;;
         *) echo "Unknown parameter passed: $1"; exit 1 ;;
@@ -45,6 +46,7 @@ if [ "$DEBUG" -eq 1 ]; then
   echo "RAW: $RAW" >&2
   echo "RUN_FILE: $RUN_SINGULARITY_FILE" >&2
   echo "SAVE_ALL: $SAVE" >&2
+  echo "CONTAINER_PATH: $CONTAINER_PATH" >&2
 fi
 
 # Check if INPUT_DIR exists and is a directory (even if one file)
@@ -104,19 +106,19 @@ for type in "${EXTENSIONS[@]}"; do
     subj_list=($( find "$INPUT_DIR" -maxdepth 1 -name "*.${type}" \( -type f -o -type l \) ))
   else
     # bids
-    subj_list=($( find "${INPUT_DIR}"/sub-*/ses-*/anat -maxdepth 1 -name "*.${type}" \( -type f -o -type l \) ))
+    subj_list=($( find "${INPUT_DIR}"/sub-*/ses-*/anat -maxdepth 1 -name "*T1*.${type}" \( -type f -o -type l \) ))
   fi
   for subj in "${subj_list[@]}"; do
-    printf "Processing subject: $subj \n" >&2 
+    #printf "Processing subject: $subj \n" >&2 
     if [ "$CONDOR" == "yes" ]; then
       sub=$(basename $subj)
-      printf "arguments = $subj $OUTPUT_DIR $SAVE $RAW \n"
+      printf "arguments = $subj $OUTPUT_DIR $CONTAINER_PATH $SAVE $RAW \n"
       printf "log       = ${LOGS_DIR}/\$(Cluster).\$(Process).${sub::-11}.log\n"
       printf "output    = ${LOGS_DIR}/\$(Cluster).\$(Process).${sub::-11}.out\n"
       printf "error     = ${LOGS_DIR}/\$(Cluster).\$(Process).${sub::-11}.err\n"
       printf "Queue\n\n"
     else
-      printf "${RUN_SINGULARITY_FILE} $subj $OUTPUT_DIR $SAVE $RAW  \n"
+      printf "${RUN_SINGULARITY_FILE} $subj $OUTPUT_DIR $CONTAINER_PATH $SAVE $RAW  \n"
     fi
   done