From 3dbcf62c5132d45a73e0bd0e561e051482f48e06 Mon Sep 17 00:00:00 2001 From: niksirbi Date: Thu, 20 Jun 2024 16:24:18 +0100 Subject: [PATCH] modify average program according to average type --- examples/BlackCap_build_template.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/BlackCap_build_template.sh b/examples/BlackCap_build_template.sh index bb56ccc..bd1ef10 100755 --- a/examples/BlackCap_build_template.sh +++ b/examples/BlackCap_build_template.sh @@ -73,6 +73,13 @@ species_dir="${atlas_dir}/${species}" templates_dir="${species_dir}/templates" working_dir="${templates_dir}/${template_name}" +# If average type is trimmed_mean or efficient_trimean, we need python +average_prog="ANTs" +if [ "${average_type}" == "trimmed_mean" ] || [ "${average_type}" == "efficient_trimean" ]; then + average_prog="python" +fi + + # Verify that the working directory exists before changing directory if [ ! -d "${working_dir}" ]; then echo "The working directory does not exist: ${working_dir}" @@ -90,6 +97,7 @@ bash modelbuild.sh --output-dir "${working_dir}" \ --stages rigid,similarity,affine,nlin \ --masks "${working_dir}/mask_paths.txt" \ --average-type "${average_type}" \ + --average-prog "${average_prog}" \ --reuse-affines \ --dry-run \ "${working_dir}/brain_paths.txt"