AFIDS_template_xalign.csh 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/tcsh
  2. # AFIDS_template_xalign.csh
  3. # make swarm script for SLURM processing
  4. #
  5. # list of templates to align to each other
  6. set template_list = ( NMT_v2.0_sym_SS.nii.gz \
  7. NMT_v2.1_asym_SS.nii.gz \
  8. NMT_1.3_SS.nii.gz \
  9. D99.nii.gz \
  10. inia19.nii \
  11. yerkes19.nii.gz \
  12. macMNI_rescale.nii.gz \
  13. )
  14. # some short names to match the list of templates in order
  15. set template_abbrev_list = ( NMTv2sym NMTv2asym NMTv1.3 D99 inia19 Yerkes19 MNImac )
  16. set template_index = 1
  17. # remove previous swarm script
  18. rm aw_all_cmds.swarm
  19. # warp all templates to all the other templates
  20. # avoid duplication by not repeating previous templates
  21. foreach template ( $template_list )
  22. # make the base to align to start at the next in the list
  23. set templatebase_index = `ccalc -int "$template_index+1" `
  24. foreach templatebase ( ${template_list[${templatebase_index}-]} )
  25. set aw_cmd = "@animal_warper -ok_to_exist \
  26. -base $templatebase \
  27. -base_abbrev ${template_abbrev_list[$templatebase_index]} \
  28. -input ${template_list[$template_index]} \
  29. -input_abbrev ${template_abbrev_list[$template_index]} \
  30. -outdir aw_${template_abbrev_list[$template_index]}_to_${template_abbrev_list[$templatebase_index]}"
  31. echo $aw_cmd >> aw_all_cmds.swarm
  32. @ templatebase_index ++
  33. end
  34. @ template_index ++
  35. end