diff --git a/.github/workflows/build_on_prerelease.yml b/.github/workflows/build_on_prerelease.yml index cefe0b46a..82a4677b4 100644 --- a/.github/workflows/build_on_prerelease.yml +++ b/.github/workflows/build_on_prerelease.yml @@ -67,7 +67,7 @@ jobs: uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc with: context: . - file: Dockerfile_testpypi_nomcr + file: Dockerfile_testpypi push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -161,7 +161,7 @@ jobs: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results run-pretest-ants-marmo: - name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg marmo) + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_noseg marmo) needs: docker-build runs-on: ubuntu-latest timeout-minutes: 1440 @@ -187,9 +187,9 @@ jobs: ls macapype_CI_v2.1/cerimed_marmo echo "" - - name: Running test pipeline cerimed_marmo ANTS_robustreg_noseg T1 T2 + - name: Running test pipeline cerimed_marmo ANTS_noseg T1 T2 run: | - docker run -i -v /home/runner/work/macapype/macapype/macapype_CI_v2.1:/data macatools/macapype:latest segment_pnh -data /data/cerimed_marmo -out /data/cerimed_marmo/results -soft ANTS_robustreg_noseg -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2 + docker run -i -v /home/runner/work/macapype/macapype/macapype_CI_v2.1:/data macatools/macapype:latest segment_pnh -data /data/cerimed_marmo -out /data/cerimed_marmo/results -soft ANTS_noseg -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2 ls /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_marmo/results/ @@ -206,7 +206,7 @@ jobs: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_marmo/results run-pretest-ants-marmoT2: - name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS marmo T2) + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_noseg marmo T2) needs: docker-build runs-on: ubuntu-latest timeout-minutes: 1440 @@ -250,7 +250,7 @@ jobs: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_marmo/results run-pretest-ants-baboon: - name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg baboon) + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg_prep baboon) needs: docker-build runs-on: ubuntu-latest timeout-minutes: 1440 @@ -294,7 +294,7 @@ jobs: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results run-pretest-ants-baboon3: - name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg baboon) + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg_prep baboon) needs: docker-build runs-on: ubuntu-latest timeout-minutes: 1440 @@ -338,7 +338,7 @@ jobs: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results3 run-pretest-ants-baboon2: - name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg baboon) + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg_prep baboon) needs: docker-build runs-on: ubuntu-latest timeout-minutes: 1440 @@ -382,7 +382,7 @@ jobs: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results2 run-pretest-ants-baboon1: - name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg baboon) + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg_prep baboon) needs: docker-build runs-on: ubuntu-latest timeout-minutes: 1440 @@ -425,6 +425,50 @@ jobs: run: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results1 + run-pretest-ants-baboon0: + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg_prep baboon) + needs: docker-build + runs-on: ubuntu-latest + timeout-minutes: 1440 + + steps: + - name: Pull latest docker image + run: + docker pull macatools/macapype:latest + + - name: Download dataset + run: | + + curl https://amubox.univ-amu.fr/public.php/dav/files/CoSC5w5ATZextme --output macapype_CI_v2.1.zip + + unzip -o macapype_CI_v2.1.zip -d macapype_CI_v2.1 + + pwd + echo "" + + ls macapype_CI_v2.1 + echo "" + + ls macapype_CI_v2.1/cerimed_baboon + echo "" + + - name: Running test pipeline cerimed_baboon ANTS_robustreg_prep T1 T2 + run: | + docker run -i -v /home/runner/work/macapype/macapype/macapype_CI_v2.1:/data macatools/macapype:latest segment_pnh -data /data/cerimed_baboon -out /data/cerimed_baboon/results0 -soft ANTS_robustreg_prep -species baboon0 -sub Prune -ses 0 -deriv -pad -dt T1 T2 + + ls /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results0/ + + ls /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results0/derivatives/ + + ls /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results0/derivatives/macapype_ants/ + + ls /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results0/derivatives/macapype_ants/sub-Prune/ses-0/anat/ + echo "" + + - name: Cleaning dataset + run: + sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results0 + run-pretest-ants-baboon3-0p6: name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg baboon) needs: docker-build @@ -452,7 +496,7 @@ jobs: ls macapype_CI_v2.1/cerimed_baboon echo "" - - name: Running test pipeline cerimed_baboon ANTS_robustreg_prep T1 T2 + - name: Running test pipeline cerimed_baboon ANTS_robustreg T1 T2 run: | docker run -i -v /home/runner/work/macapype/macapype/macapype_CI_v2.1:/data macatools/macapype:latest segment_pnh -data /data/cerimed_baboon -out /data/cerimed_baboon/results3 -soft ANTS_robustreg -species baboon3_0p6 -sub Prune -ses 3 -deriv -pad -dt T1 T2 @@ -496,7 +540,7 @@ jobs: ls macapype_CI_v2.1/cerimed_baboon echo "" - - name: Running test pipeline cerimed_baboon ANTS_robustreg_prep T1 T2 + - name: Running test pipeline cerimed_baboon ANTS_robustreg T1 T2 run: | docker run -i -v /home/runner/work/macapype/macapype/macapype_CI_v2.1:/data macatools/macapype:latest segment_pnh -data /data/cerimed_baboon -out /data/cerimed_baboon/results2 -soft ANTS_robustreg -species baboon2_0p6 -sub Prune -ses 2 -deriv -pad -dt T1 T2 @@ -540,7 +584,7 @@ jobs: ls macapype_CI_v2.1/cerimed_baboon echo "" - - name: Running test pipeline cerimed_baboon ANTS_robustreg_prep T1 T2 + - name: Running test pipeline cerimed_baboon ANTS_robustreg T1 T2 run: | docker run -i -v /home/runner/work/macapype/macapype/macapype_CI_v2.1:/data macatools/macapype:latest segment_pnh -data /data/cerimed_baboon -out /data/cerimed_baboon/results1 -soft ANTS_robustreg -species baboon1_0p6 -sub Prune -ses 2 -deriv -pad -dt T1 T2 diff --git a/.github/workflows/build_on_release.yml b/.github/workflows/build_on_release.yml index 83b9ff7fb..c1ffcf591 100644 --- a/.github/workflows/build_on_release.yml +++ b/.github/workflows/build_on_release.yml @@ -66,7 +66,7 @@ jobs: with: context: . - file: Dockerfile_nomcr + file: Dockerfile push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -161,7 +161,7 @@ jobs: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results run-pretest-ants-marmo: - name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg marmo) + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_noseg marmo) needs: docker-build runs-on: ubuntu-latest timeout-minutes: 1440 @@ -187,9 +187,9 @@ jobs: ls macapype_CI_v2.1/cerimed_marmo echo "" - - name: Running test pipeline cerimed_marmo ANTS_robustreg_noseg T1 T2 + - name: Running test pipeline cerimed_marmo ANTS_noseg T1 T2 run: | - docker run -i -v /home/runner/work/macapype/macapype/macapype_CI_v2.1:/data macatools/macapype:latest segment_pnh -data /data/cerimed_marmo -out /data/cerimed_marmo/results -soft ANTS_robustreg_noseg -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2 + docker run -i -v /home/runner/work/macapype/macapype/macapype_CI_v2.1:/data macatools/macapype:latest segment_pnh -data /data/cerimed_marmo -out /data/cerimed_marmo/results -soft ANTS_noseg -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2 ls /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_marmo/results/ @@ -206,7 +206,7 @@ jobs: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_marmo/results run-pretest-ants-marmoT2: - name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS marmo T2) + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_noseg marmo T2) needs: docker-build runs-on: ubuntu-latest timeout-minutes: 1440 @@ -250,7 +250,7 @@ jobs: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_marmo/results run-pretest-ants-baboon: - name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg baboon) + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg_prep baboon) needs: docker-build runs-on: ubuntu-latest timeout-minutes: 1440 @@ -294,7 +294,7 @@ jobs: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results run-pretest-ants-baboon3: - name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg baboon) + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg_prep baboon) needs: docker-build runs-on: ubuntu-latest timeout-minutes: 1440 @@ -338,7 +338,7 @@ jobs: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results3 run-pretest-ants-baboon2: - name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg baboon) + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg_prep baboon) needs: docker-build runs-on: ubuntu-latest timeout-minutes: 1440 @@ -382,7 +382,7 @@ jobs: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results2 run-pretest-ants-baboon1: - name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg baboon) + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg_prep baboon) needs: docker-build runs-on: ubuntu-latest timeout-minutes: 1440 @@ -425,6 +425,50 @@ jobs: run: sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results1 + run-pretest-ants-baboon0: + name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg_prep baboon) + needs: docker-build + runs-on: ubuntu-latest + timeout-minutes: 1440 + + steps: + - name: Pull latest docker image + run: + docker pull macatools/macapype:latest + + - name: Download dataset + run: | + + curl https://amubox.univ-amu.fr/public.php/dav/files/CoSC5w5ATZextme --output macapype_CI_v2.1.zip + + unzip -o macapype_CI_v2.1.zip -d macapype_CI_v2.1 + + pwd + echo "" + + ls macapype_CI_v2.1 + echo "" + + ls macapype_CI_v2.1/cerimed_baboon + echo "" + + - name: Running test pipeline cerimed_baboon ANTS_robustreg_prep T1 T2 + run: | + docker run -i -v /home/runner/work/macapype/macapype/macapype_CI_v2.1:/data macatools/macapype:latest segment_pnh -data /data/cerimed_baboon -out /data/cerimed_baboon/results0 -soft ANTS_robustreg_prep -species baboon0 -sub Prune -ses 0 -deriv -pad -dt T1 T2 + + ls /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results0/ + + ls /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results0/derivatives/ + + ls /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results0/derivatives/macapype_ants/ + + ls /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results0/derivatives/macapype_ants/sub-Prune/ses-0/anat/ + echo "" + + - name: Cleaning dataset + run: + sudo rm -rf /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results0 + run-pretest-ants-baboon3-0p6: name: Running all existing pipelines in macapype_CI_v2.1.zip (ANTS_robustreg baboon) needs: docker-build @@ -452,7 +496,7 @@ jobs: ls macapype_CI_v2.1/cerimed_baboon echo "" - - name: Running test pipeline cerimed_baboon ANTS_robustreg_prep T1 T2 + - name: Running test pipeline cerimed_baboon ANTS_robustreg T1 T2 run: | docker run -i -v /home/runner/work/macapype/macapype/macapype_CI_v2.1:/data macatools/macapype:latest segment_pnh -data /data/cerimed_baboon -out /data/cerimed_baboon/results3 -soft ANTS_robustreg -species baboon3_0p6 -sub Prune -ses 3 -deriv -pad -dt T1 T2 @@ -496,7 +540,7 @@ jobs: ls macapype_CI_v2.1/cerimed_baboon echo "" - - name: Running test pipeline cerimed_baboon ANTS_robustreg_prep T1 T2 + - name: Running test pipeline cerimed_baboon ANTS_robustreg T1 T2 run: | docker run -i -v /home/runner/work/macapype/macapype/macapype_CI_v2.1:/data macatools/macapype:latest segment_pnh -data /data/cerimed_baboon -out /data/cerimed_baboon/results2 -soft ANTS_robustreg -species baboon2_0p6 -sub Prune -ses 2 -deriv -pad -dt T1 T2 @@ -540,7 +584,7 @@ jobs: ls macapype_CI_v2.1/cerimed_baboon echo "" - - name: Running test pipeline cerimed_baboon ANTS_robustreg_prep T1 T2 + - name: Running test pipeline cerimed_baboon ANTS_robustreg T1 T2 run: | docker run -i -v /home/runner/work/macapype/macapype/macapype_CI_v2.1:/data macatools/macapype:latest segment_pnh -data /data/cerimed_baboon -out /data/cerimed_baboon/results1 -soft ANTS_robustreg -species baboon1_0p6 -sub Prune -ses 2 -deriv -pad -dt T1 T2 diff --git a/.github/workflows/check_on_PR.yml b/.github/workflows/check_on_PR.yml index 3ab6d4119..c45c5c6ff 100644 --- a/.github/workflows/check_on_PR.yml +++ b/.github/workflows/check_on_PR.yml @@ -38,71 +38,86 @@ jobs: curl https://amubox.univ-amu.fr/public.php/dav/files/CoSC5w5ATZextme --output macapype_CI_v2.1.zip unzip -o macapype_CI_v2.1.zip -d macapype_CI_v2.1 - - - name: Running all test pipelines (macaque) + - name: Running all test pipelines (macaque T1) run: | - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_test -species macaque -sub Stevie -ses 001 -dt T1 - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_test -species macaque -sub Stevie -ses 001 -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_test -species macaque -sub Stevie -ses 001 -deriv -pad -dt T1 - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft SPM_native_test -species macaque -sub Stevie -ses 001 -dt T1 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_quick_test -species macaque -sub Stevie -ses 001 -deriv -pad -dt T1 - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft SPM_native_test -species macaque -sub Stevie -ses 001 -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft SPM_native_test -species macaque -sub Stevie -ses 001 -deriv -pad -dt T1 - - name: Running all test pipelines (macaque deriv) + - name: Running all test pipelines (macaque) run: | - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_test -species macaque -sub Stevie -ses 001 -deriv -dt T1 - - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_test -species macaque -sub Stevie -ses 001 -deriv -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_test -species macaque -sub Stevie -ses 001 -deriv -pad -dt T1 T2 - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft SPM_native_test -species macaque -sub Stevie -ses 001 -deriv -dt T1 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_quick_test -species macaque -sub Stevie -ses 001 -deriv -pad -dt T1 T2 - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft SPM_native_test -species macaque -sub Stevie -ses 001 -deriv -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft SPM_native_test -species macaque -sub Stevie -ses 001 -deriv -pad -dt T1 T2 - - name: Running all test pipelines (macaque deriv pad) + - name: Running all test pipelines (macaque_0p5) run: | - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_test -species macaque -sub Stevie -ses 001 -deriv -pad -dt T1 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_test -species macaque_0p5 -sub Stevie -ses 001 -deriv -pad -dt T1 - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_test -species macaque -sub Stevie -ses 001 -deriv -pad -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft ANTS_test -species macaque_0p5 -sub Stevie -ses 001 -deriv -pad -dt T1 T2 - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft SPM_native_test -species macaque -sub Stevie -ses 001 -deriv -pad -dt T1 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft SPM_native_test -species macaque_0p5 -sub Stevie -ses 001 -deriv -pad -dt T1 - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft SPM_native_test -species macaque -sub Stevie -ses 001 -deriv -pad -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_macaque/results -soft SPM_native_test -species macaque_0p5 -sub Stevie -ses 001 -deriv -pad -dt T1 T2 - - name: Running some test pipelines (baboon / marmo) + - name: Running some test pipelines (baboon) run: | python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon -sub Prune -ses 3 -deriv -pad -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft SPM_test -species baboon -sub Prune -ses 3 -deriv -pad -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_quick_test -species baboon -sub Prune -ses 3 -deriv -pad -dt T1 T2 - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon3 -sub Prune -ses 3 -deriv -pad -dt T1 T2 + - name: Running some test pipelines (baboon3) + run: | - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon3_0p6 -sub Prune -ses 3 -deriv -pad -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon3 -sub Prune -ses 3 -deriv -pad -dt T1 T2 python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon3 -sub Prune -ses 3 -deriv -pad -dt T1 T2 + - name: Running some test pipelines (baboon2) + run: | - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon2 -sub Prune -ses 2 -deriv -pad -dt T1 T2 - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon2_0p6 -sub Prune -ses 2 -deriv -pad -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon2 -sub Prune -ses 2 -deriv -pad -dt T1 T2 python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_quick_test -species baboon2 -sub Prune -ses 2 -deriv -pad -dt T1 T2 + - name: Running some test pipelines (baboon1) + run: | - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon1 -sub Prune -ses 1 -deriv -pad -dt T1 T2 - python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon1_0p6 -sub Prune -ses 1 -deriv -pad -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon1 -sub Prune -ses 1 -deriv -pad -dt T1 T2 + - name: Running some test pipelines (baboon0) + run: | python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon0 -sub Prune -ses 0 -deriv -pad -dt T1 T2 + - name: Running some test pipelines (baboon 0p6) + run: | + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon3_0p6 -sub Prune -ses 3 -deriv -pad -dt T1 T2 + + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon2_0p6 -sub Prune -ses 2 -deriv -pad -dt T1 T2 + + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_baboon/results -soft ANTS_test -species baboon1_0p6 -sub Prune -ses 1 -deriv -pad -dt T1 T2 + + - name: Running some test pipelines (marmo) + run: | python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_marmo -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_test -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_marmo -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_marmo/results -soft SPM_test -species marmo -sub Tresor -ses 01 -deriv -pad -dt T1 T2 + python workflows/segment_pnh.py -data /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_marmo -out /home/runner/work/macapype/macapype/macapype_CI_v2.1/cerimed_marmo/results -soft ANTS_test -species marmoT2 -sub Tresor -ses 01 -deriv -pad -dt T1 T2 diff --git a/Dockerfile b/Dockerfile index e165ce147..89e873f91 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ # # Timestamp: 2020/12/02 18:33:44 UTC -FROM macatools/macapype_env:v0.2.2-spm +FROM macatools/macapype_env:v0.2.2 USER root @@ -36,7 +36,7 @@ RUN python -m pip install xvfbwrapper \ pydot \ rdflib \ pbr \ - nibabel==3.2.2 \ + nibabel \ packaging \ pytest @@ -49,8 +49,6 @@ RUN python -m pip install graphviz \ RUN python -m pip install SimpleITK -RUN python -m pip install HD-BET - ############################################# install macapype RUN python -m pip install --pre macapype diff --git a/Dockerfile_github b/Dockerfile_github deleted file mode 100644 index 45fe4058e..000000000 --- a/Dockerfile_github +++ /dev/null @@ -1,83 +0,0 @@ -# Generated by: Neurodocker version 0.7.0+15.ga4940e3.dirty -# Latest release: Neurodocker version 0.7.0 -# -# Thank you for using Neurodocker. If you discover any issues -# or ways to improve this software, please submit an issue or -# pull request on our GitHub repository: -# -# https://github.com/ReproNim/neurodocker -# -# Timestamp: 2020/12/02 18:33:44 UTC - -FROM macatools/macapype_env:v0.1.2-spm - -USER root - -ARG DEBIAN_FRONTEND="noninteractive" - -MAINTAINER David Meunier "david.meunier@univ-amu.fr" -######################## Python packages - -RUN apt-get update && apt-get install -y git python3-pip libpng-dev libfreetype6-dev libxft-dev libblas-dev liblapack-dev libatlas-base-dev gfortran libxml2-dev libxslt1-dev wget graphviz - -RUN apt-get install -y python3-pil python3-pil.imagetk - - -RUN python3 -m pip install -U pip -RUN python3 -m pip install -U pillow -#RUN pip3 install pillow - -#RUN apt-get install libx11-6 libxext6 libxt6 # matlab -RUN pip3 install xvfbwrapper \ - psutil \ - numpy \ - scipy \ - matplotlib \ - statsmodels \ - pandas \ - networkx\ - mock \ - prov \ - click \ - funcsigs \ - pydotplus \ - pydot \ - rdflib \ - pbr \ - nibabel \ - packaging \ - pytest \ - install \ - graphviz \ - pybids \ - nipype \ - nilearn \ - scikit-image \ - brain-slam - -RUN python -m pip install SimpleITK - -############################################# install macapype from github -RUN mkdir -p /opt/packages/ - -ADD https://api.github.com/repos/macatools/macapype/git/refs/heads/master version.json -WORKDIR /opt/packages/ - -RUN git clone https://github.com/macatools/macapype.git -WORKDIR /opt/packages/macapype - -RUN python3 setup.py develop - -RUN echo $(which python) && \ - echo $(which python3) && \ - ln -s /usr/bin/python3 /usr/bin/python && \ - ln -s /usr/bin/pip3 /usr/bin/pip - -################################################## Finishing -RUN apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -RUN rm -rf \ - /tmp/hsperfdata* \ - /var/*/apt/*/partial \ - /var/log/apt/term* diff --git a/Dockerfile_nomcr b/Dockerfile_spm_hdbet similarity index 93% rename from Dockerfile_nomcr rename to Dockerfile_spm_hdbet index 89e873f91..e165ce147 100644 --- a/Dockerfile_nomcr +++ b/Dockerfile_spm_hdbet @@ -9,7 +9,7 @@ # # Timestamp: 2020/12/02 18:33:44 UTC -FROM macatools/macapype_env:v0.2.2 +FROM macatools/macapype_env:v0.2.2-spm USER root @@ -36,7 +36,7 @@ RUN python -m pip install xvfbwrapper \ pydot \ rdflib \ pbr \ - nibabel \ + nibabel==3.2.2 \ packaging \ pytest @@ -49,6 +49,8 @@ RUN python -m pip install graphviz \ RUN python -m pip install SimpleITK +RUN python -m pip install HD-BET + ############################################# install macapype RUN python -m pip install --pre macapype diff --git a/Dockerfile_testpypi b/Dockerfile_testpypi index f90f8a21e..5cb8a7613 100644 --- a/Dockerfile_testpypi +++ b/Dockerfile_testpypi @@ -9,7 +9,7 @@ # # Timestamp: 2020/12/02 18:33:44 UTC -FROM macatools/macapype_env:v0.2.2-spm +FROM macatools/macapype_env:v0.2.2 USER root @@ -38,17 +38,17 @@ RUN python -m pip install xvfbwrapper \ pbr \ nibabel \ packaging \ - pytest \ - graphviz \ + pytest + +RUN python -m pip install graphviz \ pybids \ nipype \ nilearn \ scikit-image \ brain-slam -RUN python -m pip install SimpleITK -RUN python -m pip install HD-BET +RUN python -m pip install SimpleITK ############################################# install macapype diff --git a/Dockerfile_testpypi_nomcr b/Dockerfile_testpypi_spm_hdbet similarity index 93% rename from Dockerfile_testpypi_nomcr rename to Dockerfile_testpypi_spm_hdbet index 5cb8a7613..f90f8a21e 100644 --- a/Dockerfile_testpypi_nomcr +++ b/Dockerfile_testpypi_spm_hdbet @@ -9,7 +9,7 @@ # # Timestamp: 2020/12/02 18:33:44 UTC -FROM macatools/macapype_env:v0.2.2 +FROM macatools/macapype_env:v0.2.2-spm USER root @@ -38,18 +38,18 @@ RUN python -m pip install xvfbwrapper \ pbr \ nibabel \ packaging \ - pytest - -RUN python -m pip install graphviz \ + pytest \ + graphviz \ pybids \ nipype \ nilearn \ scikit-image \ brain-slam - RUN python -m pip install SimpleITK +RUN python -m pip install HD-BET + ############################################# install macapype RUN python -m pip install --no-deps --index-url https://test.pypi.org/simple/ --pre macapype diff --git a/TODO.txt b/TODO.txt index 703416010..d92dcf634 100644 --- a/TODO.txt +++ b/TODO.txt @@ -18,6 +18,8 @@ orig2 (attention, preproc deja fait mais planté... 250422-10:22:57,51 -> 250422 et ensuite: 250422-17:05:39,547 -> (hdbet 250422-17:06:01,574 -> 250422-17:07:16,945 = ~ 1min et - hdbet+full0p5: 250422-16:48:28,170 -> 250422-17:07:59,387 +spm_full: 250428-14:13:15,872 -> 250428-14:34:55,249 (sans N4debias) + 29/08/2022 Bug report diff --git a/macapype/_version.py b/macapype/_version.py index eaddd1259..f8dd2bcb4 100644 --- a/macapype/_version.py +++ b/macapype/_version.py @@ -1 +1 @@ -__version__ = '0.5.9' +__version__ = '0.5.10-rc1' diff --git a/macapype/nodes/correct_bias.py b/macapype/nodes/correct_bias.py index 2bbbf991d..e9f459758 100644 --- a/macapype/nodes/correct_bias.py +++ b/macapype/nodes/correct_bias.py @@ -250,11 +250,12 @@ def itk_debias(img_file): # Save the corrected image and bias fpath, fname, ext = split_f(img_file) cor_img_file = os.path.abspath(fname + "_debias" + ext) - - bias_img_file = os.path.abspath(fname + "_bias" + ext) - sitk.WriteImage(corrected_image, cor_img_file) + bias_img_file = os.path.abspath(fname + "_bias" + ext) sitk.WriteImage(bias_field_image, bias_img_file) + mask_img_file = os.path.abspath(fname + "_mask" + ext) + sitk.WriteImage(input_image_mask, mask_img_file) + return cor_img_file, bias_img_file diff --git a/macapype/pipelines/full_pipelines.py b/macapype/pipelines/full_pipelines.py index 79a50db07..f0b2b7fbe 100644 --- a/macapype/pipelines/full_pipelines.py +++ b/macapype/pipelines/full_pipelines.py @@ -242,7 +242,8 @@ def create_full_spm_subpipes( outputnode, 'native_to_stereo_trans') if ("fast" in params["short_preparation_pipe"] - or "N4debias" in params["short_preparation_pipe"]): + or "N4debias" in params["short_preparation_pipe"] + or "itk_debias" in params["short_preparation_pipe"]): # debiased seg_pipe.connect( @@ -339,7 +340,8 @@ def create_full_spm_subpipes( # debiased if not processed in short_preparation_pipe if not ("fast" in params["short_preparation_pipe"] - or "N4debias" in params["short_preparation_pipe"]): + or "N4debias" in params["short_preparation_pipe"] + or "itk_debias" in params["short_preparation_pipe"]): seg_pipe.connect( debias, 't1_debiased_file', @@ -966,7 +968,7 @@ def create_full_ants_subpipes( "native_to_stereo_trans"]), name='outputnode') - # preprocessing + # ##################################### preprocessing if 'short_preparation_pipe' in params.keys(): data_preparation_pipe = create_short_preparation_pipe( params=parse_key(params, "short_preparation_pipe"), @@ -1041,7 +1043,8 @@ def create_full_ants_subpipes( outputnode, "stereo_padded_T2") if ("fast" in params["short_preparation_pipe"] - or "N4debias" in params["short_preparation_pipe"]): + or "N4debias" in params["short_preparation_pipe"] + or "itk_debias" in params["short_preparation_pipe"]): # debiased seg_pipe.connect( @@ -1072,7 +1075,7 @@ def create_full_ants_subpipes( data_preparation_pipe, "outputnode.native_to_stereo_trans", outputnode, 'native_to_stereo_trans') - # ################# extract mask + # ############################################ extract mask print("mask file {}".format(mask_file)) if mask_file is None: diff --git a/macapype/pipelines/prepare.py b/macapype/pipelines/prepare.py index 27b7670de..bf40dcfdb 100644 --- a/macapype/pipelines/prepare.py +++ b/macapype/pipelines/prepare.py @@ -18,6 +18,8 @@ from ..nodes.register import pad_zero_mri +from ..nodes.correct_bias import itk_debias + # should be in nipype code directly from ..nodes.prepare import Refit @@ -653,6 +655,55 @@ def create_short_preparation_pipe(params, params_template={}, fast_T2, "restored_image", outputnode, "stereo_debiased_T2") + elif "itk_debias" in params: + + print("Found itk_debias in params.json") + + # itk_debias over T1 + itk_debias_T1 = NodeParams( + interface=niu.Function( + input_names=["img_file"], + output_names=["cor_img_file", "bias_img_file"], + function=itk_debias), + params=parse_key(params, "itk_debias"), + name='itk_debias_T1') + + if "denoise" in params.keys(): + data_preparation_pipe.connect( + denoise_T1, "output_image", + itk_debias_T1, "img_file") + else: + data_preparation_pipe.connect( + crop_aladin_pipe, "outputnode.stereo_T1", + itk_debias_T1, "img_file") + + # itk_debias over T2 + itk_debias_T2 = NodeParams( + interface=niu.Function( + input_names=["img_file"], + output_names=["cor_img_file", "bias_img_file"], + function=itk_debias), + params=parse_key(params, "itk_debias"), + name='itk_debias_T2') + + if "denoise" in params.keys(): + data_preparation_pipe.connect( + denoise_T2, "output_image", + itk_debias_T2, "img_file") + else: + data_preparation_pipe.connect( + apply_crop_aladin_T2, 'out_file', + itk_debias_T2, "img_file") + + # outputnode + data_preparation_pipe.connect( + itk_debias_T1, "cor_img_file", + outputnode, "stereo_debiased_T1") + + data_preparation_pipe.connect( + itk_debias_T2, "cor_img_file", + outputnode, "stereo_debiased_T2") + else: print("No debias will be performed before extract_pipe") diff --git a/macapype/pipelines/rename.py b/macapype/pipelines/rename.py index f71391f01..10dc05d74 100644 --- a/macapype/pipelines/rename.py +++ b/macapype/pipelines/rename.py @@ -188,7 +188,8 @@ def rename_all_brain_derivatives(params, main_workflow, segment_pnh_pipe, datasink, '@stereo_padded_T2') if ("fast" in params["short_preparation_pipe"] - or "N4debias" in params["short_preparation_pipe"]): + or "N4debias" in params["short_preparation_pipe"] + or "itk_debias" in params["short_preparation_pipe"]): # rename debiased_T1 rename_stereo_debiased_T1 = pe.Node( @@ -581,7 +582,8 @@ def rename_all_brain_derivatives(params, main_workflow, segment_pnh_pipe, # after some processing if ("fast" in params["short_preparation_pipe"] - or "N4debias" in params["short_preparation_pipe"]): + or "N4debias" in params["short_preparation_pipe"] + or "itk_debias" in params["short_preparation_pipe"]): # rename debiased_T1 rename_native_debiased_T1 = pe.Node( diff --git a/macapype/pipelines/surface.py b/macapype/pipelines/surface.py index 96b876dc1..0002d1961 100644 --- a/macapype/pipelines/surface.py +++ b/macapype/pipelines/surface.py @@ -654,7 +654,7 @@ def create_nii2mesh_brain_pipe(params={}, output_names=["mask_file"], function=merge_tissues), params=parse_key(params, "merge_brain_tissues"), - name="keep_GCC_brain") + name="merge_brain_tissues") nii2mesh_brain_pipe.connect(inputnode, 'segmented_file', merge_brain_tissues, 'dseg_file') diff --git a/workflows/segment_pnh.py b/workflows/segment_pnh.py index d9e73f2e3..ae8f568e4 100644 --- a/workflows/segment_pnh.py +++ b/workflows/segment_pnh.py @@ -262,50 +262,59 @@ def create_main_workflow(cmd, data_dir, process_dir, soft, species, datatypes, # format for relative path template_path = op.abspath(template_path) - assert os.path.exists(template_path), "Error, template_path {} do not exists".format(template_path) + assert os.path.exists(template_path), \ + "Error, template_path {} do not exists".format(template_path) print(template_files) params_template = {} - assert len(template_files) > 1, "Error, template_files unspecified {}".format(template_files) + assert len(template_files) > 1, \ + "Error, template_files unspecified {}".format(template_files) - template_head = os.path.join(template_path,template_files[0]) - assert os.path.exists(template_head), "Could not find template_head {}".format(template_head) + template_head = os.path.join(template_path, template_files[0]) + assert os.path.exists(template_head), \ + "Could not find template_head {}".format(template_head) params_template["template_head"] = template_head - - template_brain = os.path.join(template_path,template_files[1]) - assert os.path.exists(template_brain), "Could not find template_brain {}".format(template_brain) + template_brain = os.path.join(template_path, template_files[1]) + assert os.path.exists(template_brain), \ + "Could not find template_brain {}".format(template_brain) params_template["template_brain"] = template_brain if len(template_files) == 2: - print("Only two files (template_head and template_brain) have been specified, segmentation will be without priors") + print("Only two files (template_head and template_brain) have \ + been specified, segmentation will be without priors") if "brain_segment_pipe" in params.keys(): - if "segment_atropos_pipe" in params["brain_segment_pipe"].keys(): - if "use_priors" in params["brain_segment_pipe"]["segment_atropos_pipe"].keys(): - del params["brain_segment_pipe"]["segment_atropos_pipe"]["use_priors"] + pbs = params["brain_segment_pipe"] + if "segment_atropos_pipe" in pbs.keys(): + if "use_priors" in pbs["segment_atropos_pipe"].keys(): + del pbs["segment_atropos_pipe"]["use_priors"] elif len(template_files) == 3: - template_seg = os.path.join(template_path,template_files[2]) - assert os.path.exists(template_seg), "Could not find template_seg {}".format(template_seg) + template_seg = os.path.join(template_path, template_files[2]) + assert os.path.exists(template_seg), \ + "Could not find template_seg {}".format(template_seg) params_template["template_seg"] = template_seg elif len(template_files) == 5: - template_gm = os.path.join(template_path,template_files[2]) - assert os.path.exists(template_gm), "Could not find template_gm {}".format(template_gm) + template_gm = os.path.join(template_path, template_files[2]) + assert os.path.exists(template_gm), \ + "Could not find template_gm {}".format(template_gm) params_template["template_gm"] = template_gm - template_wm = os.path.join(template_path,template_files[3]) - assert os.path.exists(template_wm), "Could not find template_wm {}".format(template_wm) + template_wm = os.path.join(template_path, template_files[3]) + assert os.path.exists(template_wm), \ + "Could not find template_wm {}".format(template_wm) params_template["template_wm"] = template_wm - template_csf = os.path.join(template_path,template_files[4]) - assert os.path.exists(template_csf), "Could not find template_csf {}".format(template_csf) + template_csf = os.path.join(template_path, template_files[4]) + assert os.path.exists(template_csf), \ + "Could not find template_csf {}".format(template_csf) params_template["template_csf"] = template_csf else: @@ -355,16 +364,15 @@ def create_main_workflow(cmd, data_dir, process_dir, soft, species, datatypes, params_template_stereo = params_template - # template_brainmask_name if "template_brainmask_name" in pg.keys(): - template_brainmask_name = pg["template_brainmask_name"] - print("template_brainmask_name = {}".format(template_brainmask_name)) - template_brainmask_dir = load_test_data(template_brainmask_name, - path_to=my_path) - params_template_brainmask = format_template(template_brainmask_dir, - template_brainmask_name) + print("template_brainmask_name = {}".format( + template_brainmask_name)) + template_brainmask_dir = load_test_data( + template_brainmask_name, path_to=my_path) + params_template_brainmask = format_template( + template_brainmask_dir, template_brainmask_name) else: if not params_template: @@ -373,16 +381,15 @@ def create_main_workflow(cmd, data_dir, process_dir, soft, species, datatypes, params_template_brainmask = params_template - # template_seg_name if "template_seg_name" in pg.keys(): template_seg_name = pg["template_seg_name"] print("template_seg_name = {}".format(template_seg_name)) - template_seg_dir = load_test_data(template_seg_name, - path_to=my_path) - params_template_seg = format_template(template_seg_dir, - template_seg_name) + template_seg_dir = load_test_data( + template_seg_name, path_to=my_path) + params_template_seg = format_template( + template_seg_dir, template_seg_name) else: if not params_template: