# extract options and their arguments into variables.
while true ; do
    case "$1" in
        -i|--bids-input)
            bids_input="$2"
            shift 2
            ;;
        -o|--output-dir)
            output_dir="$2"
            shift 2
            ;;
        -s|--subject-id)
            subject_id="$2"