diff --git a/.circleci/config.yml b/.circleci/config.yml index 4b0aa8a7c..6d64df572 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ jobs: build: environment: - TZ: "/usr/share/zoneinfo/America/Los_Angeles" - - MRIQC_API_TAG: 1.0.5 + - MRIQC_API_TAG: 1.0.6 docker: - image: docker:18.01.0-ce-git @@ -133,8 +133,8 @@ jobs: name: Create Nipype config files command: | mkdir -p /tmp/t1w /tmp/bold - printf "[execution]\nstop_on_first_crash = true\nremove_unnecessary_outputs = false\n" > /tmp/t1w/nipype.cfg - echo "poll_sleep_duration = 0.2" >> /tmp/t1w/nipype.cfg + printf "[execution]\nstop_on_first_crash = true\n" > /tmp/t1w/nipype.cfg + echo "poll_sleep_duration = 0.01" >> /tmp/t1w/nipype.cfg echo "hash_method = content" >> /tmp/t1w/nipype.cfg cp /tmp/t1w/nipype.cfg /tmp/bold/nipype.cfg - persist_to_workspace: @@ -187,9 +187,8 @@ jobs: no_output_timeout: 2h command: | docker run -ti --rm=false \ - -v $PWD:/scratch -w /usr/local/src/mriqc \ - --entrypoint="py.test" \ - poldracklab/mriqc:latest mriqc/ \ + -v $PWD:/scratch --entrypoint="py.test" -w /src/mriqc \ + poldracklab/mriqc:latest mriqc \ --junitxml=/scratch/tests.xml \ --doctest-modules --ignore=docs --ignore=src --ignore=mriqc/bin \ --ignore=mriqc/classifier/sklearn --ignore=mriqc/interfaces/transitional.py @@ -219,10 +218,10 @@ jobs: name: Build MRIQC documentation no_output_timeout: 2h command: | - docker run -ti --rm=false -v /home/circleci/out/docs:/scratch/docs \ - -w /usr/local/src/mriqc/docs \ + docker run -u $( id -u ) -e PYTHONPATH=/src/mriqc -ti --rm=false \ + -v /home/circleci/out/docs:/scratch/docs \ --entrypoint=sphinx-build poldracklab/mriqc:latest \ - -T -E -W -D language=en -b html source/ /scratch/docs 2>&1 \ + -T -D language=en -b html /src/mriqc/docs/source/ /scratch/docs 2>&1 \ | tee $PWD/builddocs.log cat $PWD/builddocs.log grep -qv "ERROR" $PWD/builddocs.log @@ -261,29 +260,36 @@ jobs: docker-compose -f /tmp/src/mriqcwebapi/dockereve-master/docker-compose.yml --verbose up -d background: true + - restore_cache: + keys: + - t1w-v2-{{ epoch }} + - t1w-v2- - run: name: Run participant-level on T1w images no_output_timeout: 2h command: | mkdir -p /tmp/t1w/work /tmp/t1w/derivatives - sudo setfacl -d -m group:$(id -gn):rwx /tmp/t1w/derivatives - sudo setfacl -m group:$(id -gn):rwx /tmp/t1w/derivatives - sudo setfacl -d -m group:$(id -gn):rwx /tmp/t1w/work - sudo setfacl -m group:$(id -gn):rwx /tmp/t1w/work # Run MRIQC - docker run --rm=false -ti -v /tmp/data/${TEST_DATA_NAME}:/data:ro \ - -v $PWD:/scratch -w /scratch \ + docker run -u $( id -u ) --rm=false -ti \ + -v /tmp/data/${TEST_DATA_NAME}:/data:ro \ + -v /tmp/t1w:/scratch -w /scratch \ poldracklab/mriqc:latest \ /data derivatives/ participant \ -vv --verbose-reports --profile -m T1w --dsname circletests \ --n_procs 2 --ants-nthreads 1 --ants-float \ --webapi-url http://$( hostname -I | awk '{print $1}' )/api/v1 --upload-strict + - save_cache: + key: t1w-v2-{{ epoch }} + paths: + - /tmp/t1w/work + - run: name: Run group-level on T1w images no_output_timeout: 2h command: | - docker run --rm=false -ti -v /tmp/data/${TEST_DATA_NAME}:/data:ro \ - -v $PWD:/scratch -w /scratch \ + docker run -u $( id -u ) --rm=false -ti \ + -v /tmp/data/${TEST_DATA_NAME}:/data:ro \ + -v /tmp/t1w:/scratch -w /scratch \ poldracklab/mriqc:latest \ /data derivatives/ group \ -m T1w -vv @@ -303,7 +309,7 @@ jobs: name: Checking changes on MD5 sums of intermediate files of MRIQC command: | mkdir -p /tmp/t1w/test - export HASHCMD="docker run --rm=false -i -v $PWD:/scratch -w /scratch \ + export HASHCMD="docker run -u $( id -u ) --rm=false -i -v $PWD:/scratch -w /scratch \ --entrypoint=/usr/local/miniconda/bin/nib-hash \ poldracklab/mriqc:latest" find /tmp/t1w/work -name "*.nii.gz" -type f | sed s+/tmp/t1w/++ | sort | xargs -n1 $HASHCMD >> /tmp/t1w/test/nii_outputs.txt @@ -324,7 +330,7 @@ jobs: docker run --rm=false -ti -v $PWD:/scratch -w /scratch \ --entrypoint="dfcheck" poldracklab/mriqc:latest \ -i /scratch/derivatives/group_T1w.tsv \ - -r /usr/local/src/mriqc/mriqc/data/testdata/group_T1w.tsv + -r /src/mriqc/mriqc/data/testdata/group_T1w.tsv - run: name: WebAPI - Check records @@ -340,7 +346,7 @@ jobs: command: | docker run --rm=false -ti -v $PWD:/scratch -w /scratch \ --entrypoint=mriqc_clf poldracklab/mriqc:latest \ - --train --test -P /usr/local/miniconda/lib/python3.6/site-packages/mriqc/data/mclf_run-20170724-191452_mod-rfc_ver-0.9.7-rc8_class-2_cv-loso_data-all_settings.yml -v + --train --test -P /usr/local/miniconda/lib/python3.7/site-packages/mriqc/data/mclf_run-20170724-191452_mod-rfc_ver-0.9.7-rc8_class-2_cv-loso_data-all_settings.yml -v # Run the classifier on the test data docker run --rm=false -ti -v $PWD:/scratch -w /scratch \ --entrypoint=mriqc_clf poldracklab/mriqc:latest \ @@ -380,17 +386,18 @@ jobs: docker-compose -f /tmp/src/mriqcwebapi/dockereve-master/docker-compose.yml --verbose up -d background: true + - restore_cache: + keys: + - bold-v1-{{ epoch }} + - bold-v1- + - run: name: Run participant-level on BOLD images no_output_timeout: 2h command: | mkdir -p /tmp/bold/work /tmp/bold/derivatives - sudo setfacl -d -m group:$(id -gn):rwx /tmp/bold/derivatives - sudo setfacl -m group:$(id -gn):rwx /tmp/bold/derivatives - sudo setfacl -d -m group:$(id -gn):rwx /tmp/bold/work - sudo setfacl -m group:$(id -gn):rwx /tmp/bold/work # Run MRIQC - docker run --rm=false -ti -v /tmp/data/${TEST_DATA_NAME}:/data:ro \ + docker run -u $( id -u ) --rm=false -ti -v /tmp/data/${TEST_DATA_NAME}:/data:ro \ -v $PWD:/scratch -w /scratch \ poldracklab/mriqc:latest \ /data derivatives/ participant \ @@ -398,12 +405,16 @@ jobs: --n_procs 2 --ants-nthreads 1 --ants-float \ --testing --ica \ --webapi-url http://$( hostname -I | awk '{print $1}' )/api/v1 --upload-strict + - save_cache: + key: bold-v1-{{ epoch }} + paths: + - /tmp/bold/work - run: name: Run group-level on BOLD images no_output_timeout: 2h command: | - docker run --rm=false -ti -v /tmp/data/${TEST_DATA_NAME}:/data:ro \ + docker run -u $( id -u ) --rm=false -ti -v /tmp/data/${TEST_DATA_NAME}:/data:ro \ -v $PWD:/scratch -w /scratch \ poldracklab/mriqc:latest \ /data derivatives/ group \ @@ -424,7 +435,7 @@ jobs: name: Checking changes on MD5 sums of intermediate files of MRIQC command: | mkdir -p /tmp/bold/test - export HASHCMD="docker run --rm=false -i -v $PWD:/scratch -w /scratch \ + export HASHCMD="docker run -u $( id -u ) --rm=false -i -v $PWD:/scratch -w /scratch \ --entrypoint=/usr/local/miniconda/bin/nib-hash \ poldracklab/mriqc:latest" find /tmp/bold/work -name "*.nii.gz" -type f | sed s+/tmp/bold/++ | sort | xargs -n1 $HASHCMD >> /tmp/bold/test/nii_outputs.txt @@ -442,10 +453,10 @@ jobs: - run: name: Checking changes on IQMs command: | - docker run --rm=false -ti -v $PWD:/scratch -w /scratch \ + docker run -u $( id -u ) --rm=false -ti -v $PWD:/scratch -w /scratch \ --entrypoint="dfcheck" poldracklab/mriqc:latest \ -i /scratch/derivatives/group_bold.tsv \ - -r /usr/local/src/mriqc/mriqc/data/testdata/group_bold.tsv + -r /src/mriqc/mriqc/data/testdata/group_bold.tsv - run: name: WebAPI - Check records diff --git a/.circleci/nii_T1w.txt b/.circleci/nii_T1w.txt index 142352773..5f84e66be 100644 --- a/.circleci/nii_T1w.txt +++ b/.circleci/nii_T1w.txt @@ -1,84 +1,80 @@ -66b1134ac071c6716e490d3804554fa04778bbf3 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/binarize/sub-50137_T1w_conformed_calc_thresh.nii.gz -15ccdd4645a6b8e0825312f2d3d3ebc8df8ed2e9 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/inu_n4/sub-50137_T1w_conformed_bias.nii.gz -3a3347b831762f5415bcc3d84a328facc5b56234 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/inu_n4/sub-50137_T1w_conformed_corrected.nii.gz -a3495421d86e2427599522bf63288e61bd1475e1 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/skullstrip/sub-50137_T1w_conformed_corrected_skullstrip.nii.gz -f3a7828f3271156a820be41621fc442e96d4414c work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/sstrip_orig_vol/sub-50137_T1w_conformed_calc.nii.gz -3d267af7824d80aa8e3d9b45eee4f556e731d64a work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/binarize/sub-50152_T1w_conformed_calc_thresh.nii.gz -7a80c649e8ca254a9768696a88a0faf41984c226 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/inu_n4/sub-50152_T1w_conformed_bias.nii.gz -9913213d42a58f86e9140eef3f2656dbc55c54fa work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/inu_n4/sub-50152_T1w_conformed_corrected.nii.gz -33ee7cfedc5542b32ba31d9d5b59e4fb3b02c15d work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/skullstrip/sub-50152_T1w_conformed_corrected_skullstrip.nii.gz -1a2a556297cca641874cb867df3d01a6fcf6a91a work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/sstrip_orig_vol/sub-50152_T1w_conformed_calc.nii.gz -1e61cea44924558f34113d193a729b2795b4b6be work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/binarize/sub-50785_T1w_conformed_calc_thresh.nii.gz -2bb2f18bd079b27d53f5f57e38a29a223b1995f8 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/inu_n4/sub-50785_T1w_conformed_bias.nii.gz -409e6cac86d18b31a1e442fc7040f732ff4f7f37 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/inu_n4/sub-50785_T1w_conformed_corrected.nii.gz -46550dda2bae5bbf111b18a90dbdecc3e264fc77 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/skullstrip/sub-50785_T1w_conformed_corrected_skullstrip.nii.gz -f5c68f3304b212e7178fce9ca29de4972d184539 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/sstrip_orig_vol/sub-50785_T1w_conformed_calc.nii.gz -553bcfd596c1c3e039d7966de6de712fd4fb81d7 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/binarize/sub-51187_T1w_conformed_calc_thresh.nii.gz -59a51baeb2e08e682eac1381e839ba5c8ca55814 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/inu_n4/sub-51187_T1w_conformed_bias.nii.gz -b015180ba2be5c4a92ee85dedf6ccaf2212c1289 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/inu_n4/sub-51187_T1w_conformed_corrected.nii.gz -0e645d84db56c9eeeb6a8677d16b3f9e0300c692 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/skullstrip/sub-51187_T1w_conformed_corrected_skullstrip.nii.gz -794d0ad33aa4e4b4ed7dbe3d7c910cf24d642d99 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/sstrip_orig_vol/sub-51187_T1w_conformed_calc.nii.gz -7906d9872ab61279a29b49b132a478eea3df8688 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/ArtifactMask/sub-50137_T1w_conformed_air.nii.gz +9a92e7c386533d31e5bfc4ad49ffb3d492eec1d6 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/binarize/sub-50137_T1w_conformed_calc_thresh.nii.gz +6f29624c0036af0c7d566c7bfd9027df3e18b5f8 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/inu_n4/sub-50137_T1w_conformed_bias.nii.gz +48370e81cef4815fe41478f8a9c94bbd7b948e06 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/inu_n4/sub-50137_T1w_conformed_corrected.nii.gz +965472fb1dc321103d98a8fd7a406ab1af1279e0 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/skullstrip/sub-50137_T1w_conformed_corrected_skullstrip.nii.gz +8774f57ed5c290e6273159ffb8f1e73b3684df45 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/sstrip_orig_vol/sub-50137_T1w_conformed_calc.nii.gz +3652a9449a6f6c37e701b37d4a695aa5de6260f9 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/binarize/sub-50152_T1w_conformed_calc_thresh.nii.gz +1059e6518d088f18bfd85669ac0169cb4d68703d work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/inu_n4/sub-50152_T1w_conformed_bias.nii.gz +74edffbfd1af9e32963c4d10df2c8ab5868560bb work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/inu_n4/sub-50152_T1w_conformed_corrected.nii.gz +d47198c27e1c76390e2437ad4e435da78322f046 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/skullstrip/sub-50152_T1w_conformed_corrected_skullstrip.nii.gz +5e0693822ab1ac062b738cbd0278e9e935e89f35 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/sstrip_orig_vol/sub-50152_T1w_conformed_calc.nii.gz +127d0b9b48105e9d2aadf0bad9f071dc9d24e3c4 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/binarize/sub-50785_T1w_conformed_calc_thresh.nii.gz +c68a10b39fdc16fdfaf240d114a1ed4fa738c18b work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/inu_n4/sub-50785_T1w_conformed_bias.nii.gz +5e4c5e9955afb56bdeabfd544ad65fa51cc23520 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/inu_n4/sub-50785_T1w_conformed_corrected.nii.gz +0c79cc8e03727f414cfc90c1367135a0e1df5d4c work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/skullstrip/sub-50785_T1w_conformed_corrected_skullstrip.nii.gz +765e8b4b46b9dc33bc39b279deb8095abcc5bb7f work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/sstrip_orig_vol/sub-50785_T1w_conformed_calc.nii.gz +21337ed3fc70a5af64a75e27b6476077d412d3e6 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/binarize/sub-51187_T1w_conformed_calc_thresh.nii.gz +426c43bfe8f7ee51948b11fa61d777b2cb211b4e work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/inu_n4/sub-51187_T1w_conformed_bias.nii.gz +fe56b6075549d6c4d6239983876290635d64077c work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/inu_n4/sub-51187_T1w_conformed_corrected.nii.gz +16bbb34805a77b57b18e58555d7847df2c1cf487 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/skullstrip/sub-51187_T1w_conformed_corrected_skullstrip.nii.gz +f434838d0efa62b3e1022eb148b0e27f602652e0 work/workflow_enumerator/anatMRIQCT1w/AFNISkullStripWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/sstrip_orig_vol/sub-51187_T1w_conformed_calc.nii.gz +cf26214eed6d341a1856ff8cb31c6a10eaf030ae work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/ArtifactMask/sub-50137_T1w_conformed_air.nii.gz 46dbbcae9f4ec6fae7f9601b7ffea5f3527bdd1e work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/ArtifactMask/sub-50137_T1w_conformed_art.nii.gz -7906d9872ab61279a29b49b132a478eea3df8688 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/ArtifactMask/sub-50137_T1w_conformed_hat.nii.gz -24f24178bbf57db5c1589ba824d728ad9d3ae61d work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/Binarize/1mm_headmask_trans_bin.nii.gz -386957ba007512b921fa8e880984efe915117e6a work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/invert_xfm/1mm_headmask_trans.nii.gz +cf26214eed6d341a1856ff8cb31c6a10eaf030ae work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/ArtifactMask/sub-50137_T1w_conformed_hat.nii.gz +c1ffc790efc005d42d180db8a6fbef8d53bee8e4 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/invert_xfm/tpl-MNI152NLin2009cAsym_res-01_desc-head_mask_trans.nii.gz 88fd4c5240cca8c256f82e70a671fbe3b81c9424 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/RotationMask/sub-50137_T1w_conformed_rotmask.nii.gz -7bb3caeb378dc9291d2d762b50561378f1bf4201 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/ArtifactMask/sub-50152_T1w_conformed_air.nii.gz +759cbde23cedfcbc938ee4d4f361548931a1f7e6 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/ArtifactMask/sub-50152_T1w_conformed_air.nii.gz b512dc02495729f9ba0b13737f82e358a75072e4 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/ArtifactMask/sub-50152_T1w_conformed_art.nii.gz -7bb3caeb378dc9291d2d762b50561378f1bf4201 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/ArtifactMask/sub-50152_T1w_conformed_hat.nii.gz -037e1f86e6ae23b760cb6d3a8ecd1b68a98a7cd5 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/Binarize/1mm_headmask_trans_bin.nii.gz -0e768e9afd2c3980e6bd8f6356e2dcb790df982a work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/invert_xfm/1mm_headmask_trans.nii.gz +759cbde23cedfcbc938ee4d4f361548931a1f7e6 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/ArtifactMask/sub-50152_T1w_conformed_hat.nii.gz +3ab911c0ab5698029a4de199abaf91f990dfbae1 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/invert_xfm/tpl-MNI152NLin2009cAsym_res-01_desc-head_mask_trans.nii.gz 7f9efcf8bfb15abc2bb5d50895087da883f05af8 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/RotationMask/sub-50152_T1w_conformed_rotmask.nii.gz -001ac0e639160f73754188139c82411b16c09444 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/ArtifactMask/sub-50785_T1w_conformed_air.nii.gz +b44e51fb122ca820f6a6d181dabca10215957e04 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/ArtifactMask/sub-50785_T1w_conformed_air.nii.gz aaafd84713bf0e7b43e45845c3c93228de07e735 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/ArtifactMask/sub-50785_T1w_conformed_art.nii.gz -001ac0e639160f73754188139c82411b16c09444 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/ArtifactMask/sub-50785_T1w_conformed_hat.nii.gz -d2fd9fa12f428a8574af3f4dd5d832217de15003 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/Binarize/1mm_headmask_trans_bin.nii.gz -d47cf46e463630ef738c2b73659fc3831d109194 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/invert_xfm/1mm_headmask_trans.nii.gz +b44e51fb122ca820f6a6d181dabca10215957e04 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/ArtifactMask/sub-50785_T1w_conformed_hat.nii.gz +32587aacefa9e47e579a11de6e7104b548bb9a3a work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/invert_xfm/tpl-MNI152NLin2009cAsym_res-01_desc-head_mask_trans.nii.gz cfbaeb98f52ddbee089d18ee1140ea56ce833c3c work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/RotationMask/sub-50785_T1w_conformed_rotmask.nii.gz -74ae22587f9ba5d16f65773b6d5dd57cdca6c50a work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/ArtifactMask/sub-51187_T1w_conformed_air.nii.gz +00e410d8366f8ef91b2250d85e7efd01d030ed17 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/ArtifactMask/sub-51187_T1w_conformed_air.nii.gz 592e57ccb78ec6efe24709d15ccb6935df53c1c4 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/ArtifactMask/sub-51187_T1w_conformed_art.nii.gz -74ae22587f9ba5d16f65773b6d5dd57cdca6c50a work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/ArtifactMask/sub-51187_T1w_conformed_hat.nii.gz -8ce986afe76665ec9ef3dfa3277dad747cbd1aab work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/Binarize/1mm_headmask_trans_bin.nii.gz -2f99d18fc5eb805d840aa7dbfed359c35cedd166 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/invert_xfm/1mm_headmask_trans.nii.gz +00e410d8366f8ef91b2250d85e7efd01d030ed17 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/ArtifactMask/sub-51187_T1w_conformed_hat.nii.gz +02ab15cb7721c07b85923eb9066946bb18ca1f74 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/invert_xfm/tpl-MNI152NLin2009cAsym_res-01_desc-head_mask_trans.nii.gz 11561c7df9e70b0e478c7cb562823bb58b03cdf9 work/workflow_enumerator/anatMRIQCT1w/AirMaskWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/RotationMask/sub-51187_T1w_conformed_rotmask.nii.gz -ead3b879f8090ac401f39286c494fe6530518bfc work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/harmonize/sub-50137_T1w_conformed_corrected_harmonized.nii.gz -316e89bad12dfaf37631f53213fd1d8be689e66b work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t10/1mm_tpm_csf_trans.nii.gz -4f8059ffd6f74ee41c96490f412b9cf969a1bdd8 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t11/1mm_tpm_gm_trans.nii.gz -4a1c43a04c1f535a240d8938122d7f9a88469ddb work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t12/1mm_tpm_wm_trans.nii.gz -69490d4c90cec86dac92680b4e35fc4f8283d8ee work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/harmonize/sub-50152_T1w_conformed_corrected_harmonized.nii.gz -cf454a1f309061beedf2fe0b82fce09417f830f9 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t10/1mm_tpm_csf_trans.nii.gz -31c5fd69e49ff1c79ee857a0c1cdfc0f05f4f410 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t11/1mm_tpm_gm_trans.nii.gz -c0b7ff073eda15cc30e86ec7998227ca040a04b5 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t12/1mm_tpm_wm_trans.nii.gz -bba46bcde1ddeacb553f162f97731e6b0afe611e work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/harmonize/sub-50785_T1w_conformed_corrected_harmonized.nii.gz -1dcb4f1501b5ad050959cc5ee4f8bfbbfa843adc work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t10/1mm_tpm_csf_trans.nii.gz -5db8e0577e16719f172108757503029458c9a52e work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t11/1mm_tpm_gm_trans.nii.gz -c46928e93e803a376da0c3dfff5884175c4bcd0a work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t12/1mm_tpm_wm_trans.nii.gz -5fa09d11f1fb79e6e5d8de463e398e4712946916 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/harmonize/sub-51187_T1w_conformed_corrected_harmonized.nii.gz -bf42cc6819e5193c07a911d184b35d8a45d0718a work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t10/1mm_tpm_csf_trans.nii.gz -7cad465d30245e3ba803a91b06a7f9e163a078ad work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t11/1mm_tpm_gm_trans.nii.gz -4905b94d27322f8d7690c32f1b0b8d13acbfe5bc work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t12/1mm_tpm_wm_trans.nii.gz -4200aa64620eebbf0ff4edb83c651060b902d01a work/workflow_enumerator/anatMRIQCT1w/HeadMaskWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/fsl_bet/sub-50137_T1w_conformed_corrected_brain_outskin_mask.nii.gz -f90b3629d96412cace1fd9288ac61efdb596a7f2 work/workflow_enumerator/anatMRIQCT1w/HeadMaskWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/fsl_bet/sub-50152_T1w_conformed_corrected_brain_outskin_mask.nii.gz -bbebc568637e7f22d8fdb791aea32c3d22550220 work/workflow_enumerator/anatMRIQCT1w/HeadMaskWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/fsl_bet/sub-50785_T1w_conformed_corrected_brain_outskin_mask.nii.gz -00b0065df1a6f94e509c3a21e971c0be4e39247e work/workflow_enumerator/anatMRIQCT1w/HeadMaskWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/fsl_bet/sub-51187_T1w_conformed_corrected_brain_outskin_mask.nii.gz +99428bf5cfaaddd2db46c38cbf9820f5a3e30bec work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/harmonize/sub-50137_T1w_conformed_corrected_harmonized.nii.gz +aca5a8899a25c23202c399680dd317a1f0c4be9d work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t10/tpl-MNI152NLin2009cAsym_res-01_label-CSF_probseg_trans.nii.gz +dcd4d025b2e84a12a071b7209ea9aa6bb82ed4db work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t11/tpl-MNI152NLin2009cAsym_res-01_label-GM_probseg_trans.nii.gz +3ff9470ff5f19838a498b5eb4ca583b0eb798162 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t12/tpl-MNI152NLin2009cAsym_res-01_label-WM_probseg_trans.nii.gz +8007ebc5119a0d27a01069cb8f5f4c087780017d work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/harmonize/sub-50152_T1w_conformed_corrected_harmonized.nii.gz +eae44da9f21a336db17a3997dc8c4f7d4c6e1f9d work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t10/tpl-MNI152NLin2009cAsym_res-01_label-CSF_probseg_trans.nii.gz +41cf86b1ac845f0c4f3dde630ee9965b13a1259c work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t11/tpl-MNI152NLin2009cAsym_res-01_label-GM_probseg_trans.nii.gz +3d7237bd25d0706c9f2c234ec949ff7d54c261e5 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t12/tpl-MNI152NLin2009cAsym_res-01_label-WM_probseg_trans.nii.gz +4115b7f7e431c226259b89a2a05f1354b204e533 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/harmonize/sub-50785_T1w_conformed_corrected_harmonized.nii.gz +feca228f0830de7a76322a2a5826641088461d56 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t10/tpl-MNI152NLin2009cAsym_res-01_label-CSF_probseg_trans.nii.gz +a7fda8a7c8a6dab682eade709c5ea17d9d9412e5 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t11/tpl-MNI152NLin2009cAsym_res-01_label-GM_probseg_trans.nii.gz +75952cf2c0bb614fe84589380e468c42d6400133 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t12/tpl-MNI152NLin2009cAsym_res-01_label-WM_probseg_trans.nii.gz +5a8af310ef965ef540cb06c86d12cc8e634a1139 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/harmonize/sub-51187_T1w_conformed_corrected_harmonized.nii.gz +00a228cf8d38be0ec3a2b2347c5efce3a96c1a9a work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t10/tpl-MNI152NLin2009cAsym_res-01_label-CSF_probseg_trans.nii.gz +2f82525c5c46da855c57f629ec28664d5ddaf676 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t11/tpl-MNI152NLin2009cAsym_res-01_label-GM_probseg_trans.nii.gz +c7d89d2fbf9f99b0596f1600a7bb50309e5d5d10 work/workflow_enumerator/anatMRIQCT1w/ComputeIQMs/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/MNItpms2t1/mapflow/_MNItpms2t12/tpl-MNI152NLin2009cAsym_res-01_label-WM_probseg_trans.nii.gz +371b77c46d1eb76bce8a648b00b0b68d423290f3 work/workflow_enumerator/anatMRIQCT1w/HeadMaskWorkflow/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/fsl_bet/sub-50137_T1w_conformed_corrected_brain_outskin_mask.nii.gz +cf314082fb821b4f36314a5613dd4da9cd0d7ebd work/workflow_enumerator/anatMRIQCT1w/HeadMaskWorkflow/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/fsl_bet/sub-50152_T1w_conformed_corrected_brain_outskin_mask.nii.gz +e3365dab067936cbe9473959c4780a75ae17f995 work/workflow_enumerator/anatMRIQCT1w/HeadMaskWorkflow/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/fsl_bet/sub-50785_T1w_conformed_corrected_brain_outskin_mask.nii.gz +7a28f812301816853336961265cd8777c0069454 work/workflow_enumerator/anatMRIQCT1w/HeadMaskWorkflow/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/fsl_bet/sub-51187_T1w_conformed_corrected_brain_outskin_mask.nii.gz e49e0da89180585da7c9c052d5dc85bd018517b8 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/conform/sub-50137_T1w_conformed.nii.gz -b78b889fe80f3dd487bdd60b796e0cd532604ccd work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/segmentation/segment_pve_0.nii.gz -220233a3e437ddf5a2aefe266b3c2c5b060a50db work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/segmentation/segment_pve_1.nii.gz -be98a50ad103cda0c7acf5d77d56d2b39326176d work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/segmentation/segment_pve_2.nii.gz -77837282d4a560ab168f5121e94c48ba47e9e9e6 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/segmentation/segment_seg.nii.gz +ef500d544ba9fe8aedbfdbcb4cc0e5e34c1b6716 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/segmentation/segment_pve_0.nii.gz +4ac81b460bb75531ce2f336af321660822e9ee5e work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/segmentation/segment_pve_1.nii.gz +5323a5748e079d80c48d1b60d2a4f535581fc4aa work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/segmentation/segment_pve_2.nii.gz +5b7cc457dba5d6f37ed3b1e716a9294e93896980 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50137..anat..sub-50137_T1w.nii.gz/segmentation/segment_seg.nii.gz 1d63b8dbc88a816b149cde842af7c23c262ce22a work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/conform/sub-50152_T1w_conformed.nii.gz -df336d6da74d4609424298ba8818d501785e9c90 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/segmentation/segment_pve_0.nii.gz -e2c68a5b07c33eee90b31cd6ee0143bc0fb22894 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/segmentation/segment_pve_1.nii.gz -9ffa4f5bd8259ac4074c17244db85b949668b090 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/segmentation/segment_pve_2.nii.gz -59c3815a079592766dbd3645ffb97257ac42e281 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/segmentation/segment_seg.nii.gz +fc190473b80fdce3f4d392c47a16c310e658ff51 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/segmentation/segment_pve_0.nii.gz +604dfff29871180c695bdef9c4a494bd69d3d488 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/segmentation/segment_pve_1.nii.gz +89034740d78b1aad5dfe708398e651139f5a3aad work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/segmentation/segment_pve_2.nii.gz +7fcc33b33984303f7eceeccc9c5e127b8cc8e793 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50152..anat..sub-50152_T1w.nii.gz/segmentation/segment_seg.nii.gz eeda1696304a13628b1e086071dec0b205313983 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/conform/sub-50785_T1w_conformed.nii.gz -2af16f3ada4e6d760219f03bf3390ac8153cce04 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/segmentation/segment_pve_0.nii.gz -25fa1a32a1f4f8af94e86a7b172e1957a8e3ff3d work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/segmentation/segment_pve_1.nii.gz -58a88d211961327efc74c389f4623e132c471c87 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/segmentation/segment_pve_2.nii.gz -90bbdba73b3be1e2b3edc74fd8a1468ef697e619 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/segmentation/segment_seg.nii.gz +6770b87bedcab1eb18d91112cfb6bedd41427f6d work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/segmentation/segment_pve_0.nii.gz +bd2f4cd4d0e46c71fad5becd368bfe4ad1244799 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/segmentation/segment_pve_1.nii.gz +42ef87a5609f0b459bc3be0ba2264658a6c680d6 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/segmentation/segment_pve_2.nii.gz +d909f2277d80d303b22d15854a58f2f74e0a5994 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-50785..anat..sub-50785_T1w.nii.gz/segmentation/segment_seg.nii.gz a97dcf6fcd68b7d878a95e1ee263ea69771963f7 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/conform/sub-51187_T1w_conformed.nii.gz -6bb09fb63613a684caf93ad168c28db64d7bacf4 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/segmentation/segment_pve_0.nii.gz -28fb5661dd39271459f730dec1e6acf35b04fa68 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/segmentation/segment_pve_1.nii.gz -bdeb37c079135f8b3f71c31e3c932106f220d710 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/segmentation/segment_pve_2.nii.gz -96a2bf9e7163ca87815a661f3f9373b2e1d0b120 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/segmentation/segment_seg.nii.gz +46aad9b9a72f73c8c0f9fbbafd06331ae4fa1db0 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/segmentation/segment_pve_0.nii.gz +84445363641d90cd41af32215e58ef9b4cb02cf2 work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/segmentation/segment_pve_1.nii.gz +ed090043df9741e920b67e444ce203ca4c01892b work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/segmentation/segment_pve_2.nii.gz +616e5b8ef4d94aca5078a801643652955e4fce2d work/workflow_enumerator/anatMRIQCT1w/_in_file_..data..sub-51187..anat..sub-51187_T1w.nii.gz/segmentation/segment_seg.nii.gz diff --git a/.circleci/nii_bold.txt b/.circleci/nii_bold.txt index cc5d99820..53ded4b3f 100644 --- a/.circleci/nii_bold.txt +++ b/.circleci/nii_bold.txt @@ -76,39 +76,39 @@ fa480a7c9724a40d7db2dab1994a4e83abead9b8 work/workflow_enumerator/funcMRIQC/Repo 9a0a5ff9a6291941d7005d99f80436e3af3dc4c5 work/workflow_enumerator/funcMRIQC/ReportsWorkflow/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-01_bold.nii.gz/SpikesMask/sub-ds205s09_task-view_acq-LR_run-01_bold_valid_spmask.nii.gz 9a0a5ff9a6291941d7005d99f80436e3af3dc4c5 work/workflow_enumerator/funcMRIQC/ReportsWorkflow/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-02_bold.nii.gz/SpikesMask/sub-ds205s09_task-view_acq-LR_run-02_bold_valid_spmask.nii.gz 9a0a5ff9a6291941d7005d99f80436e3af3dc4c5 work/workflow_enumerator/funcMRIQC/ReportsWorkflow/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-RL_run-01_bold.nii.gz/SpikesMask/sub-ds205s09_task-view_acq-RL_run-01_bold_valid_spmask.nii.gz -f6c496588993f00af66b17fc9466d7eed8c9c042 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-functionallocalizer_run-01_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz -dc579ca907a5b2c82fc942e35abeeb7e09fc506b work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-functionallocalizer_run-01_bold.nii.gz/EPIApplyMask/sub-ds205s03_task-functionallocalizer_run-01_bold_volreg_tstat_corrected_masked.nii.gz -6b9f210f9067faca4a53b301db7fdbfd9340f881 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-functionallocalizer_run-01_bold.nii.gz/ResampleSegmentation/1mm_parc_trans.nii.gz -54b3dd0a1d748fe7b5d33e683e5077e00c50a012 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-functionallocalizer_run-01_bold.nii.gz/SharpenEPI/sub-ds205s03_task-functionallocalizer_run-01_bold_volreg_tstat_corrected.nii.gz -00a7aa4634fc6878acd29aa60cb68276ec5776ee work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-01_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz -d295887efb6bb0cd26f670b750d388c08be58d97 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-01_bold.nii.gz/EPIApplyMask/sub-ds205s03_task-view_run-01_bold_volreg_tstat_corrected_masked.nii.gz -20fb27b89b836e23927b539c886e74fb0470e346 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-01_bold.nii.gz/ResampleSegmentation/1mm_parc_trans.nii.gz -b6cf0da415c3bd1a7026e50c9b4e379b0876b6a5 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-01_bold.nii.gz/SharpenEPI/sub-ds205s03_task-view_run-01_bold_volreg_tstat_corrected.nii.gz -3e62f937466d836c126f724f16c1962e7af6dc7b work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-02_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz -d096b9e841a09df1a9de27061dececd0afb35cbf work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-02_bold.nii.gz/EPIApplyMask/sub-ds205s03_task-view_run-02_bold_volreg_tstat_corrected_masked.nii.gz -c6821e09711b47caa10eaf58c91ff6c8c273c674 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-02_bold.nii.gz/ResampleSegmentation/1mm_parc_trans.nii.gz -4b224a4ba177ebdd830ae3ff4571e898dbaa72e4 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-02_bold.nii.gz/SharpenEPI/sub-ds205s03_task-view_run-02_bold_volreg_tstat_corrected.nii.gz -14a88506ef5bc721ecfc4d04af92ddca214ba88f work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-functionallocalizer_run-01_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz -66a7878750e174ae4810f52575de36cf1bef0020 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-functionallocalizer_run-01_bold.nii.gz/EPIApplyMask/sub-ds205s07_task-functionallocalizer_run-01_bold_valid_volreg_tstat_corrected_masked.nii.gz -ffcf629a6b5c5f171f15170a12cc7fd8d96cb69c work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-functionallocalizer_run-01_bold.nii.gz/ResampleSegmentation/1mm_parc_trans.nii.gz -74807011524ecc342cc8d65cda748b14a63193a2 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-functionallocalizer_run-01_bold.nii.gz/SharpenEPI/sub-ds205s07_task-functionallocalizer_run-01_bold_valid_volreg_tstat_corrected.nii.gz -a4d5db00e58cb23de4dbbe49cb7af972f25205a9 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-01_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz -c73bf51ab8b2298af6a1fb7c076c9235d1ec9fb0 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-01_bold.nii.gz/EPIApplyMask/sub-ds205s07_task-view_run-01_bold_valid_volreg_tstat_corrected_masked.nii.gz -5abbfa82f9a7a3a004649b851327c617313244fc work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-01_bold.nii.gz/ResampleSegmentation/1mm_parc_trans.nii.gz -992120fed101ac03c020348e80f35f6fa9a36371 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-01_bold.nii.gz/SharpenEPI/sub-ds205s07_task-view_run-01_bold_valid_volreg_tstat_corrected.nii.gz -5e439e4668d64a564af6b6b4a3786094cbbef9dd work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-02_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz -d0baa7755be4e8774fc7be7a68ebadf99062f970 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-02_bold.nii.gz/EPIApplyMask/sub-ds205s07_task-view_run-02_bold_valid_volreg_tstat_corrected_masked.nii.gz -3cedd1343bc7c1e0b7726a1a3869603e1fb35c06 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-02_bold.nii.gz/ResampleSegmentation/1mm_parc_trans.nii.gz -31a47816c2083df11ff794f6f385749ad0193b1c work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-02_bold.nii.gz/SharpenEPI/sub-ds205s07_task-view_run-02_bold_valid_volreg_tstat_corrected.nii.gz -6f9d4eb5966f1efe8a7d1edcee6dfe8dc411ecfe work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-01_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz -c184cb8542c22024b31c2855cd9c9f8bac2f31c4 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-01_bold.nii.gz/EPIApplyMask/sub-ds205s09_task-view_acq-LR_run-01_bold_valid_volreg_tstat_corrected_masked.nii.gz -75209ca7b080ba90a2d82486703b420e4465de7b work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-01_bold.nii.gz/ResampleSegmentation/1mm_parc_trans.nii.gz -29bc6199c1055f76248821d61d3b36b00ee10a79 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-01_bold.nii.gz/SharpenEPI/sub-ds205s09_task-view_acq-LR_run-01_bold_valid_volreg_tstat_corrected.nii.gz -9b5401f120d30d01595fb0bbe123ab61d8a53f52 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-02_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz -78a3a7b86689456a1d2f8353780a738db1ce0f3a work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-02_bold.nii.gz/EPIApplyMask/sub-ds205s09_task-view_acq-LR_run-02_bold_valid_volreg_tstat_corrected_masked.nii.gz -641ba936886acd6bc5c4217017726c3a4b939712 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-02_bold.nii.gz/ResampleSegmentation/1mm_parc_trans.nii.gz -e85e3d199bcef833217dd4bb14efa61348cbb35f work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-02_bold.nii.gz/SharpenEPI/sub-ds205s09_task-view_acq-LR_run-02_bold_valid_volreg_tstat_corrected.nii.gz -a961d294e0525332a7b75be28f1a83412917048f work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-RL_run-01_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz -9eb9c3f2a111343f90e0864d3c5d230734473d9e work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-RL_run-01_bold.nii.gz/EPIApplyMask/sub-ds205s09_task-view_acq-RL_run-01_bold_valid_volreg_tstat_corrected_masked.nii.gz -56c5f9b0fd925dcfffee8009b45e372a3daafa72 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-RL_run-01_bold.nii.gz/ResampleSegmentation/1mm_parc_trans.nii.gz -55011350691f533da2b5360f31aeacd0f21b94ae work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-RL_run-01_bold.nii.gz/SharpenEPI/sub-ds205s09_task-view_acq-RL_run-01_bold_valid_volreg_tstat_corrected.nii.gz +d26778b0c794f5a74c0eb96141bd9d5a61c84a46 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-functionallocalizer_run-01_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz +1514a711c993f95b456eca4398c5492bfb1105b8 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-functionallocalizer_run-01_bold.nii.gz/EPIApplyMask/sub-ds205s03_task-functionallocalizer_run-01_bold_volreg_tstat_corrected_masked.nii.gz +1cfa05686fa867133ddf5706a701ea3bd15e84ef work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-functionallocalizer_run-01_bold.nii.gz/ResampleSegmentation/tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg_trans.nii.gz +50d9d5c68f347339cd328d529e2b9609fb10a21d work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-functionallocalizer_run-01_bold.nii.gz/SharpenEPI/sub-ds205s03_task-functionallocalizer_run-01_bold_volreg_tstat_corrected.nii.gz +943bbc88e600440d3df54c41735f51255f0ac4c9 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-01_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz +f5e5a4e224d49535c57f4c796a575abc47464805 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-01_bold.nii.gz/EPIApplyMask/sub-ds205s03_task-view_run-01_bold_volreg_tstat_corrected_masked.nii.gz +8e1297af871809cba137118b543de09c842c5b1e work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-01_bold.nii.gz/ResampleSegmentation/tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg_trans.nii.gz +9046c7623b26e154f4f714ecf732f76f511053cc work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-01_bold.nii.gz/SharpenEPI/sub-ds205s03_task-view_run-01_bold_volreg_tstat_corrected.nii.gz +c90b38f766cf20735037d8cd8062142663c5721d work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-02_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz +cf88c140694ba790db08631a440128824c5ba4e5 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-02_bold.nii.gz/EPIApplyMask/sub-ds205s03_task-view_run-02_bold_volreg_tstat_corrected_masked.nii.gz +c343b813434590e0eabfccef9bf07f1b319a91ec work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-02_bold.nii.gz/ResampleSegmentation/tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg_trans.nii.gz +7d1a1dab08854c1bbfef13129d82d0e9e03808fe work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s03..func..sub-ds205s03_task-view_run-02_bold.nii.gz/SharpenEPI/sub-ds205s03_task-view_run-02_bold_volreg_tstat_corrected.nii.gz +264076d6d9d8f5117db0cbe59cf0a362d9750ff8 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-functionallocalizer_run-01_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz +4cb6ad95538c5f6a2210e60266834a769f50e76d work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-functionallocalizer_run-01_bold.nii.gz/EPIApplyMask/sub-ds205s07_task-functionallocalizer_run-01_bold_valid_volreg_tstat_corrected_masked.nii.gz +eea9d462427edc75112bc30b5f5d8d25cf97ed67 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-functionallocalizer_run-01_bold.nii.gz/ResampleSegmentation/tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg_trans.nii.gz +b0ca8c0c1983d7e24b58c399349b26ed423eb8d2 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-functionallocalizer_run-01_bold.nii.gz/SharpenEPI/sub-ds205s07_task-functionallocalizer_run-01_bold_valid_volreg_tstat_corrected.nii.gz +ee40f571c58d711ce988434c6851409cf22141a2 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-01_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz +780bc0b3f5f60eb73bad8b1aca217da89544ae7b work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-01_bold.nii.gz/EPIApplyMask/sub-ds205s07_task-view_run-01_bold_valid_volreg_tstat_corrected_masked.nii.gz +f3e7718327b3f50cb0d21080ec827ee47e2e538d work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-01_bold.nii.gz/ResampleSegmentation/tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg_trans.nii.gz +0ec2152aa23b37c85efc59ff12b80026d0edde30 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-01_bold.nii.gz/SharpenEPI/sub-ds205s07_task-view_run-01_bold_valid_volreg_tstat_corrected.nii.gz +0bafe125a6aff05a0e6ef6fd3ee5fe63e6df02e0 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-02_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz +72ac5f10fcdbd04624303cd408a6e428697bf6db work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-02_bold.nii.gz/EPIApplyMask/sub-ds205s07_task-view_run-02_bold_valid_volreg_tstat_corrected_masked.nii.gz +8cb124441eaf390cbc5c4b9da2df54bf3b168dd4 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-02_bold.nii.gz/ResampleSegmentation/tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg_trans.nii.gz +b3adb385ee36a153eff4de9ca1f546b373af8aad work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s07..func..sub-ds205s07_task-view_run-02_bold.nii.gz/SharpenEPI/sub-ds205s07_task-view_run-02_bold_valid_volreg_tstat_corrected.nii.gz +3f8539319824d58bdb8dff78b7de9024ac817f50 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-01_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz +f3e4181e5f3838b3867bdd7bc663831ea84ecfc0 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-01_bold.nii.gz/EPIApplyMask/sub-ds205s09_task-view_acq-LR_run-01_bold_valid_volreg_tstat_corrected_masked.nii.gz +c6ebee83facd9357a7a3b3299b97d78704fe8cd4 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-01_bold.nii.gz/ResampleSegmentation/tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg_trans.nii.gz +94a14db67caba1d55e08b44d289a537aa5745269 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-01_bold.nii.gz/SharpenEPI/sub-ds205s09_task-view_acq-LR_run-01_bold_valid_volreg_tstat_corrected.nii.gz +e2b413bc868c19c7b8e697a2c216d47f82cf7379 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-02_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz +debeccb7e1e5e43b6d56b834e5175eb6ff4ee67e work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-02_bold.nii.gz/EPIApplyMask/sub-ds205s09_task-view_acq-LR_run-02_bold_valid_volreg_tstat_corrected_masked.nii.gz +e2305cd5acdea541eb1e587c927934e5f2d8c92f work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-02_bold.nii.gz/ResampleSegmentation/tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg_trans.nii.gz +9a1e497d7906a11d0d6e874f8cf3859b380b8cbb work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-LR_run-02_bold.nii.gz/SharpenEPI/sub-ds205s09_task-view_acq-LR_run-02_bold_valid_volreg_tstat_corrected.nii.gz +36394edc8a0760401163bfa9d8d7b2bf12e863ec work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-RL_run-01_bold.nii.gz/EPI2MNI/epi_to_mni_Warped.nii.gz +60408d8f1f396a8d2ad15af495e23dbd3dd82031 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-RL_run-01_bold.nii.gz/EPIApplyMask/sub-ds205s09_task-view_acq-RL_run-01_bold_valid_volreg_tstat_corrected_masked.nii.gz +a4636cc2fd30a382881bd4181c5c1e3d654d5583 work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-RL_run-01_bold.nii.gz/ResampleSegmentation/tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg_trans.nii.gz +38036a42555b6864c02a150c9bb1f0367624b86b work/workflow_enumerator/funcMRIQC/SpatialNormalization/_in_file_..data..sub-ds205s09..func..sub-ds205s09_task-view_acq-RL_run-01_bold.nii.gz/SharpenEPI/sub-ds205s09_task-view_acq-RL_run-01_bold_valid_volreg_tstat_corrected.nii.gz diff --git a/CHANGES.txt b/CHANGES.txt index 49f4197fd..a5f4ba1dd 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,20 @@ +0.15.0 (April 4, 2019) +====================== + +A long overdue update, pinning updated versions of +`TemplateFlow `__ and +`Niworkflows `__. +With thanks to @garciadias for contributions. + + * ENH: Use TemplateFlow and niworkflows-0.8.x (#782) @oesteban + * ENH: Revision of QI2 (#606) @oesteban + * FIX: Set matplotlib backend early (#759) @oesteban + * FIX: Niworkflows pin <0.5 (#766) @oesteban + * DOC: Update BIDS validation link. (#764) @garciadias + * DOC: Add data sharing agreement (#765) @oesteban + * FIX: Catch uncaught exception in WebAPI upload. (#774) @rwblair + * FIX/DOC: Append new line after dashes in ``mriqc_run`` help text (#777) @rwblair + 0.14.2 (August 20, 2018) ======================== diff --git a/Dockerfile b/Dockerfile index 6d0ba5e36..84b3e9948 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,43 +2,47 @@ FROM ubuntu:xenial-20161213 # Pre-cache neurodebian key -COPY docker/files/neurodebian.gpg /etc/neurodebian.gpg +COPY docker/files/neurodebian.gpg /usr/local/etc/neurodebian.gpg + +# Installing Neurodebian packages (FSL, AFNI, git) +RUN apt-get update && \ + apt-get install -y --no-install-recommends curl && \ + apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ + curl -sSL "http://neuro.debian.net/lists/xenial.us-ca.full" >> /etc/apt/sources.list.d/neurodebian.sources.list && \ + apt-key add /usr/local/etc/neurodebian.gpg && \ + (apt-key adv --refresh-keys --keyserver hkp://ha.pool.sks-keyservers.net 0xA5D32F012649A5A9 || true) # Prepare environment RUN apt-get update && \ apt-get install -y --no-install-recommends \ - curl \ + autoconf \ + build-essential \ bzip2 \ ca-certificates \ + curl \ cython3 \ - build-essential \ - autoconf \ + ed \ + git \ + git-annex-standalone \ + graphviz=2.38.0-12ubuntu2 \ + gsl-bin \ + libglib2.0-0 \ + libglu1-mesa-dev \ + libglw1-mesa \ + libgomp1 \ + libjpeg62 \ libtool \ - pkg-config && \ - curl -sSL http://neuro.debian.net/lists/xenial.us-ca.full >> /etc/apt/sources.list.d/neurodebian.sources.list && \ - apt-key add /etc/neurodebian.gpg && \ - (apt-key adv --refresh-keys --keyserver hkp://ha.pool.sks-keyservers.net 0xA5D32F012649A5A9 || true) - -# Installing Neurodebian packages (FSL, git) -RUN apt-get update && \ + libxm4 \ + netpbm \ + pkg-config \ + tcsh \ + xfonts-base \ + xvfb \ + fsl-core=5.0.9-5~nd16.04+1 \ + fsl-mni152-templates && \ + curl -sSL https://deb.nodesource.com/setup_10.x | bash - && \ apt-get install -y --no-install-recommends \ - fsl-core \ - fsl-mni152-templates - -ENV FSLDIR=/usr/share/fsl/5.0 \ - FSLOUTPUTTYPE=NIFTI_GZ \ - FSLMULTIFILEQUIT=TRUE \ - POSSUMDIR=/usr/share/fsl/5.0 \ - LD_LIBRARY_PATH=/usr/lib/fsl/5.0:$LD_LIBRARY_PATH \ - FSLTCLSH=/usr/bin/tclsh \ - FSLWISH=/usr/bin/wish \ - PATH=/usr/lib/fsl/5.0:/usr/lib/afni/bin:$PATH - -# Installing AFNI (version 17_3_03 archived on OSF) -RUN apt-get update -qq && apt-get install -yq --no-install-recommends ed gsl-bin libglu1-mesa-dev libglib2.0-0 libglw1-mesa \ - libgomp1 libjpeg62 libxm4 netpbm tcsh xfonts-base xvfb && \ - libs_path=/usr/lib/x86_64-linux-gnu && \ - ln -s $libs_path/libgsl.so.19 $libs_path/libgsl.so.0; \ + nodejs && \ echo "Install libxp (not in all ubuntu/debian repositories)" && \ apt-get install -yq --no-install-recommends libxp6 \ || /bin/bash -c " \ @@ -49,103 +53,118 @@ RUN apt-get update -qq && apt-get install -yq --no-install-recommends ed gsl-bin || /bin/bash -c " \ curl -o /tmp/libpng12.deb -sSL http://mirrors.kernel.org/debian/pool/main/libp/libpng/libpng12-0_1.2.49-1%2Bdeb7u2_amd64.deb \ && dpkg -i /tmp/libpng12.deb && rm -f /tmp/libpng12.deb" && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ - mkdir -p /opt/afni && \ + ln -s /usr/lib/x86_64-linux-gnu/libgsl.so.19 /usr/lib/x86_64-linux-gnu/libgsl.so.0 && \ + ldconfig && \ + apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* + +ENV FSLDIR="/usr/share/fsl/5.0" \ + FSLOUTPUTTYPE="NIFTI_GZ" \ + FSLMULTIFILEQUIT="TRUE" \ + POSSUMDIR="/usr/share/fsl/5.0" \ + LD_LIBRARY_PATH="/usr/lib/fsl/5.0:$LD_LIBRARY_PATH" \ + FSLTCLSH="/usr/bin/tclsh" \ + FSLWISH="/usr/bin/wish" +ENV PATH="/usr/lib/fsl/5.0:/usr/lib/afni/bin:$PATH" + +# Installing ANTs 2.2.0 (NeuroDocker build) +ENV ANTSPATH=/usr/lib/ants +RUN mkdir -p $ANTSPATH && \ + curl -sSL "https://dl.dropbox.com/s/2f4sui1z6lcgyek/ANTs-Linux-centos5_x86_64-v2.2.0-0740f91.tar.gz" \ + | tar -xzC $ANTSPATH --strip-components 1 +ENV PATH=$ANTSPATH:$PATH + +# Installing AFNI (version 17_3_03 archived on OSF) +RUN mkdir -p /opt/afni && \ curl -o afni.tar.gz -sSLO "https://files.osf.io/v1/resources/fvuh8/providers/osfstorage/5a0dd9a7b83f69027512a12b" && \ tar zxv -C /opt/afni --strip-components=1 -f afni.tar.gz && \ - rm -rf afni.tar.gz && \ - ldconfig -ENV PATH=/opt/afni:$PATH - -# Installing and setting up ANTs -RUN mkdir -p /opt/ants && \ - curl -sSL "https://github.com/stnava/ANTs/releases/download/v2.1.0/Linux_Ubuntu14.04.tar.bz2" \ - | tar -xjC /opt/ants --strip-components 1 -ENV ANTSPATH=/opt/ants \ - PATH=/opt/ants:$PATH - -# Installing WEBP tools -RUN curl -sSLO "http://downloads.webmproject.org/releases/webp/libwebp-0.5.2-linux-x86-64.tar.gz" && \ - tar -xf libwebp-0.5.2-linux-x86-64.tar.gz && cd libwebp-0.5.2-linux-x86-64/bin && \ - mv cwebp /usr/local/bin/ && rm -rf libwebp-0.5.2-linux-x86-64 + rm -rf afni.tar.gz +ENV PATH=/opt/afni:$PATH \ + AFNI_MODELPATH="/opt/afni/models" \ + AFNI_IMSAVE_WARNINGS="NO" \ + AFNI_TTATLAS_DATASET="/opt/afni/atlases" \ + AFNI_PLUGINPATH="/opt/afni/plugins" + +# Create a shared $HOME directory +RUN useradd -m -s /bin/bash -G users bidsapp +WORKDIR /home/bidsapp +ENV HOME="/home/bidsapp" # Installing SVGO -RUN curl -sL https://deb.nodesource.com/setup_7.x | bash - -RUN apt-get install -y nodejs RUN npm install -g svgo -# Installing Ubuntu packages and cleaning up -RUN apt-get install -y --no-install-recommends \ - git=1:2.7.4-0ubuntu1 \ - graphviz=2.38.0-12ubuntu2 && \ - apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - # Installing and setting up miniconda -RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-4.3.11-Linux-x86_64.sh && \ - bash Miniconda3-4.3.11-Linux-x86_64.sh -b -p /usr/local/miniconda && \ - rm Miniconda3-4.3.11-Linux-x86_64.sh - -ENV PATH=/usr/local/miniconda/bin:$PATH \ - LANG=C.UTF-8 \ - LC_ALL=C.UTF-8 +RUN curl -sSLO https://repo.continuum.io/miniconda/Miniconda3-4.5.11-Linux-x86_64.sh && \ + bash Miniconda3-4.5.11-Linux-x86_64.sh -b -p /usr/local/miniconda && \ + rm Miniconda3-4.5.11-Linux-x86_64.sh + +# Set CPATH for packages relying on compiled libs (e.g. indexed_gzip) +ENV PATH="/usr/local/miniconda/bin:$PATH" \ + CPATH="/usr/local/miniconda/include/:$CPATH" \ + LANG="C.UTF-8" \ + LC_ALL="C.UTF-8" \ + # PYTHONWARNINGS="ignore,default:::mriqc,default:::nipype" \ + PYTHONNOUSERSITE=1 # Installing precomputed python packages -RUN conda install -c conda-forge -y openblas=0.2.19; \ - sync && \ - conda install -c conda-forge -y \ - numpy=1.12.0 \ - cython \ - scipy=0.19.0 \ - matplotlib=2.2.0 \ - pandas=0.23.2 \ - libxml2=2.9.4 \ - libxslt=1.1.29 \ - sympy=1.0 \ - statsmodels=0.8.0 \ - dipy=0.11.0 \ +RUN conda install -y python=3.7.1 \ + graphviz=2.40.1 \ + libxml2=2.9.8 \ + libxslt=1.1.32 \ + matplotlib=2.2.2 \ + mkl-service \ + mkl=2018.0.3 \ + numpy=1.15.4 \ + pandas=0.23.4 \ + scikit-learn=0.19.1 \ + scipy=1.1.0 \ + setuptools>=40.0.0 \ traits=4.6.0 \ - psutil=5.2.2 \ - sphinx=1.5.4; \ - sync && \ - chmod -R a+rX /usr/local/miniconda && \ - chmod +x /usr/local/miniconda/bin/* && \ - conda clean --all -y; sync && \ - python -c "from matplotlib import font_manager" && \ - sed -i 's/\(backend *: \).*$/\1Agg/g' $( python -c "import matplotlib; print(matplotlib.matplotlib_fname())" ) + zlib; sync && \ + chmod -R a+rX /usr/local/miniconda; sync && \ + chmod +x /usr/local/miniconda/bin/*; sync && \ + conda build purge-all; sync && \ + conda clean -tipsy && sync # Unless otherwise specified each process should only use one thread - nipype # will handle parallelization ENV MKL_NUM_THREADS=1 \ OMP_NUM_THREADS=1 +# Precaching fonts, set 'Agg' as default backend for matplotlib +RUN python -c "from matplotlib import font_manager" && \ + sed -i 's/\(backend *: \).*$/\1Agg/g' $( python -c "import matplotlib; print(matplotlib.matplotlib_fname())" ) + + # Installing dev requirements (packages that are not in pypi) -WORKDIR /usr/local/src/mriqc +WORKDIR /src/ COPY requirements.txt requirements.txt -RUN pip install -r requirements.txt && \ - rm -rf ~/.cache/pip +RUN pip install --no-cache-dir -r requirements.txt -# Precaching atlases after niworkflows is available -RUN mkdir /niworkflows_data -ENV CRN_SHARED_DATA /niworkflows_data -RUN python -c 'from niworkflows.data.getters import get_mni_icbm152_nlin_asym_09c; get_mni_icbm152_nlin_asym_09c()' +# Precaching atlases +ENV TEMPLATEFLOW_HOME="/opt/templateflow" +RUN mkdir -p $TEMPLATEFLOW_HOME +RUN python -c "from templateflow import api as tfapi; \ + tfapi.get('MNI152NLin2009cAsym')" # Installing MRIQC -COPY . /usr/local/src/mriqc +COPY . /src/mriqc ARG VERSION -RUN echo "${VERSION}" > mriqc/VERSION && \ - pip install .[all] && \ - find /usr/local/miniconda/lib/python*/site-packages/mriqc -type f -exec chmod a+r {} + && \ - rm -rf ~/.cache/pip +# Force static versioning within container +RUN echo "${VERSION}" > /src/mriqc/mriqc/VERSION && \ + echo "include mriqc/VERSION" >> /src/mriqc/MANIFEST.in && \ + cd /src/mriqc && \ + pip install --no-cache-dir .[all] -# Run mriqc by default -ENTRYPOINT ["/usr/local/miniconda/bin/mriqc"] +RUN find $HOME -type d -exec chmod go=u {} + && \ + find $HOME -type f -exec chmod go=u {} + # Best practices RUN ldconfig -WORKDIR /tmp +WORKDIR /tmp/ + +# Run mriqc by default +ENTRYPOINT ["/usr/local/miniconda/bin/mriqc"] -# Store metadata ARG BUILD_DATE ARG VCS_REF LABEL org.label-schema.build-date=$BUILD_DATE \ diff --git a/docs/source/about.rst b/docs/source/about.rst index b98790e59..254887e76 100644 --- a/docs/source/about.rst +++ b/docs/source/about.rst @@ -3,4 +3,4 @@ Introduction ============ .. include:: ../../README.rst - :start-line: 44 + :start-line: 42 diff --git a/docs/source/conf.py b/docs/source/conf.py index 446b11c1e..9c2c4f1ff 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,7 +14,6 @@ All configuration values have a default; values that are commented out serve to show the default. """ -from __future__ import print_function, division, absolute_import, unicode_literals import os import sys diff --git a/docs/source/install.rst b/docs/source/install.rst index e91da1c51..188daabdc 100644 --- a/docs/source/install.rst +++ b/docs/source/install.rst @@ -27,8 +27,7 @@ installed (see below). Second, the latest development version of MRIQC can be installed from github using ``pip`` on a Python 3 environment: :: - pip install -r https://raw.githubusercontent.com/poldracklab/mriqc/master/requirements.txt - pip install git+https://github.com/poldracklab/mriqc.git + python -m pip install -U mriqc .. warning:: @@ -39,8 +38,8 @@ github using ``pip`` on a Python 3 environment: :: Execution system dependencies ''''''''''''''''''''''''''''' -If you are using a linux distribution with `neurodebian `_, installation -should be as easy as:: +If you are using a a `Neurodebian `_ Linux distribution, +installation should be as easy as:: sudo apt-get install fsl afni ants sudo ln -sf /usr/lib/ants/N4BiasFieldCorrection /usr/local/bin/ diff --git a/mriqc/__about__.py b/mriqc/__about__.py index 9f9edd836..1480a1a37 100644 --- a/mriqc/__about__.py +++ b/mriqc/__about__.py @@ -51,34 +51,33 @@ 'License :: OSI Approved :: BSD License', 'Programming Language :: Python :: 3.5', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', ] SETUP_REQUIRES = [] REQUIRES = [ + 'PyYAML', + 'dipy', + 'jinja2', + 'matplotlib', + 'nibabel>=2.2.1', + 'nilearn', + 'nipy', 'nipype>=1.1.1', - 'niworkflows>=0.4.2,<0.5', - 'pybids>=0.6.4', - 'numpy>=1.12.0', + 'nitime', + 'niworkflows<0.9.0a0,>=0.8.2', + 'numpy', 'pandas>=0.21.0', - 'scikit-learn>=0.19.0', + 'pybids<0.8.0a0,>=0.7.1', 'scikit-image', - 'future', + 'scikit-learn>=0.19.0', 'scipy', - 'six', - 'matplotlib', - 'nibabel', - 'dipy', - 'jinja2', 'seaborn', - 'PyYAML', - 'nitime', - 'nilearn', - 'svgutils', - 'nipy', + 'six', 'statsmodels', - 'versioneer', - 'xvfbwrapper', + 'svgutils', + 'templateflow<0.2.0a0,>=0.1.7', ] LINKS_REQUIRES = [ diff --git a/mriqc/__init__.py b/mriqc/__init__.py index 20807dfd7..ed5948643 100644 --- a/mriqc/__init__.py +++ b/mriqc/__init__.py @@ -8,23 +8,22 @@ assessment protocols)` for :abbr:`MRI (magnetic resonance imaging)`. """ -from __future__ import print_function, division, absolute_import, unicode_literals import sys import logging from .__about__ import ( - __version__, __author__, - __email__, - __maintainer__, __copyright__, __credits__, - __license__, - __status__, __description__, + __download__, + __email__, + __license__, __longdesc__, + __maintainer__, + __status__, __url__, - __download__, + __version__, ) LOG_FORMAT = '%(asctime)s %(name)s:%(levelname)s %(message)s' @@ -43,3 +42,19 @@ 'ants_nthreads': 6, 'float32': False } + +__all__ = [ + '__author__', + '__copyright__', + '__credits__', + '__description__', + '__download__', + '__email__', + '__license__', + '__longdesc__', + '__maintainer__', + '__status__', + '__url__', + '__version__', + 'MRIQC_LOG', +] diff --git a/mriqc/bin/abide2bids.py b/mriqc/bin/abide2bids.py index c4d443d73..27b9c728d 100644 --- a/mriqc/bin/abide2bids.py +++ b/mriqc/bin/abide2bids.py @@ -9,7 +9,6 @@ ABIDE2BIDS downloader tool """ -from __future__ import absolute_import, division, print_function, unicode_literals import os import os.path as op diff --git a/mriqc/bin/dfcheck.py b/mriqc/bin/dfcheck.py index c000f476f..cfad3f403 100644 --- a/mriqc/bin/dfcheck.py +++ b/mriqc/bin/dfcheck.py @@ -9,7 +9,6 @@ Compares pandas dataframes by columns """ -from __future__ import absolute_import, division, print_function, unicode_literals import sys from pathlib import Path diff --git a/mriqc/bin/fs2gif.py b/mriqc/bin/fs2gif.py index 6fb8281c8..964fa480f 100644 --- a/mriqc/bin/fs2gif.py +++ b/mriqc/bin/fs2gif.py @@ -9,10 +9,6 @@ Batch export freesurfer results to animated gifs """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals import os import os.path as op @@ -107,7 +103,7 @@ def main(): ref_file = op.join(tmp_sub, '%s.mgz' % subid) img = nb.load(niifile) data = exposure.equalize_adapthist(img.get_data(), clip_limit=0.03) - nb.Nifti1Image(data, img.get_affine(), img.get_header()).to_filename(modnii) + nb.Nifti1Image(data, img.affine, img.header).to_filename(modnii) sp.call(['mri_convert', modnii, ref_file], cwd=tmp_sub) if not opts.zoom: diff --git a/mriqc/bin/labeler.py b/mriqc/bin/labeler.py index 2173b78de..4f46d203a 100644 --- a/mriqc/bin/labeler.py +++ b/mriqc/bin/labeler.py @@ -4,7 +4,6 @@ # vi: set ft=python sts=4 ts=4 sw=4 et: # @Author: dbirman # @Date: 2017-06-14 16:51:24 -from __future__ import print_function, division, absolute_import, unicode_literals import sys import csv diff --git a/mriqc/bin/mriqc_clf.py b/mriqc/bin/mriqc_clf.py index 40190999f..c84aa250f 100644 --- a/mriqc/bin/mriqc_clf.py +++ b/mriqc/bin/mriqc_clf.py @@ -6,7 +6,6 @@ mriqc_fit command line interface definition """ -from __future__ import absolute_import, division, print_function, unicode_literals from sys import version_info from os.path import isfile, abspath import warnings diff --git a/mriqc/bin/mriqc_plot.py b/mriqc/bin/mriqc_plot.py index ebb8c1357..22d1a473a 100644 --- a/mriqc/bin/mriqc_plot.py +++ b/mriqc/bin/mriqc_plot.py @@ -9,10 +9,6 @@ MRIQC Plot script """ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function -from __future__ import unicode_literals import os import os.path as op diff --git a/mriqc/bin/mriqc_run.py b/mriqc/bin/mriqc_run.py index f3ce17901..a30abee3a 100644 --- a/mriqc/bin/mriqc_run.py +++ b/mriqc/bin/mriqc_run.py @@ -8,16 +8,12 @@ MRIQC ===== """ -from __future__ import print_function, division, absolute_import, unicode_literals - from os import cpu_count import logging import gc from pathlib import Path import matplotlib -from .. import __version__ - DSA_MESSAGE = """\ Anonymized quality metrics (IQMs) will be submitted to MRIQC's metrics repository. \ Submission of IQMs can be disabled using the ``--no-sub`` argument. \ @@ -27,6 +23,7 @@ matplotlib.use('Agg') # Replace matplotlib's backend ASAP (see #758) logging.addLevelName(25, 'IMPORTANT') # Add a new level between INFO and WARNING logging.addLevelName(15, 'VERBOSE') # Add a new level between INFO and DEBUG +logging.captureWarnings(True) DEFAULT_MEM_GB = 8 @@ -34,7 +31,7 @@ def get_parser(): """Build parser object""" from argparse import ArgumentParser from argparse import RawTextHelpFormatter - from .. import DEFAULTS, __description__ + from .. import DEFAULTS, __description__, __version__ parser = ArgumentParser( description="""MRIQC: MRI Quality Control\n\n\ @@ -76,8 +73,7 @@ def get_parser(): g_bids.add_argument('--task-id', action='store', nargs='*', type=str, help='filter input dataset by task id') g_bids.add_argument('-m', '--modalities', action='store', nargs='*', - choices=['T1w', 'bold', 'T2w'], default=['T1w', 'bold', 'T2w'], - help='filter input dataset by MRI type ("T1w", "T2w", or "bold")') + help='filter input dataset by MRI type') g_bids.add_argument('--dsname', type=str, help='a dataset name') # Control instruments @@ -172,6 +168,8 @@ def main(): import sys from nipype import logging as nlogging from multiprocessing import set_start_method, Process, Manager + from .. import __version__ + set_start_method('forkserver') # Run parser @@ -264,6 +262,7 @@ def main(): # Set up group level if 'group' in analysis_levels: + from ..utils.bids import DEFAULT_TYPES from ..reports import group_html from ..utils.misc import generate_tsv # , generate_pred @@ -271,7 +270,7 @@ def main(): # Generate reports mod_group_reports = [] - for mod in opts.modalities: + for mod in opts.modalities or DEFAULT_TYPES: dataframe, out_tsv = generate_tsv( opts.output_dir.expanduser().resolve(), mod) # If there are no iqm.json files, nothing to do. @@ -300,8 +299,7 @@ def main(): def init_mriqc(opts, retval): """Build the workflow enumerator""" - - from bids.grabbids import BIDSLayout + from bids.layout import BIDSLayout from nipype import config as ncfg from nipype.pipeline.engine import Workflow @@ -379,7 +377,11 @@ def init_mriqc(opts, retval): settings['ants_nthreads'] = 1 else: plugin_settings['plugin'] = 'MultiProc' - plugin_settings['plugin_args'] = {'n_procs': n_procs} + plugin_settings['plugin_args'] = { + 'n_procs': n_procs, + 'raise_insufficient': False, + 'maxtasksperchild': 1, + } if opts.mem_gb: plugin_settings['plugin_args']['memory_gb'] = opts.mem_gb @@ -394,22 +396,20 @@ def init_mriqc(opts, retval): with opts.use_plugin.open() as pfile: plugin_settings.update(loadyml(pfile)) - # Process data types - modalities = opts.modalities - layout = BIDSLayout(str(settings['bids_dir']), - exclude=['derivatives', 'sourcedata']) + exclude=['derivatives', 'sourcedata', r'^\..*']) dataset = collect_bids_data( layout, participant_label=opts.participant_label, session=opts.session_id, run=opts.run_id, task=opts.task_id, - bids_type=modalities, + bids_type=opts.modalities, ) workflow = Workflow(name='workflow_enumerator') workflow.base_dir = settings['work_dir'] + modalities = [mod for mod, val in dataset.items() if val] wf_list = [] subject_list = [] diff --git a/mriqc/bin/mriqcwebapi_test.py b/mriqc/bin/mriqcwebapi_test.py index 587767b8d..ba4873021 100644 --- a/mriqc/bin/mriqcwebapi_test.py +++ b/mriqc/bin/mriqcwebapi_test.py @@ -2,7 +2,6 @@ # -*- coding: utf-8 -*- # @Author: oesteban # @Date: 2015-11-19 16:44:27 -from __future__ import print_function, division, absolute_import, unicode_literals def get_parser(): diff --git a/mriqc/bin/nib_hash.py b/mriqc/bin/nib_hash.py index 002cebe23..16a26a958 100644 --- a/mriqc/bin/nib_hash.py +++ b/mriqc/bin/nib_hash.py @@ -9,7 +9,6 @@ Extracts the sha hash of the contents of a nifti file. """ -from __future__ import absolute_import, division, print_function, unicode_literals import nibabel as nb from hashlib import sha1 diff --git a/mriqc/bin/subject_wrangler.py b/mriqc/bin/subject_wrangler.py index fdb896275..97d374134 100644 --- a/mriqc/bin/subject_wrangler.py +++ b/mriqc/bin/subject_wrangler.py @@ -9,7 +9,6 @@ BIDS-Apps subject wrangler """ -from __future__ import print_function, division, absolute_import, unicode_literals from builtins import range # pylint: disable=W0622 import os.path as op diff --git a/mriqc/classifier/__init__.py b/mriqc/classifier/__init__.py index 58f9d1f01..864de2366 100644 --- a/mriqc/classifier/__init__.py +++ b/mriqc/classifier/__init__.py @@ -23,4 +23,3 @@ cv/experiments """ -from __future__ import print_function, division, absolute_import, unicode_literals diff --git a/mriqc/classifier/data.py b/mriqc/classifier/data.py index 619684789..b6ecf38ab 100644 --- a/mriqc/classifier/data.py +++ b/mriqc/classifier/data.py @@ -12,7 +12,6 @@ """ -from __future__ import absolute_import, division, print_function, unicode_literals from pathlib import Path import numpy as np @@ -292,7 +291,7 @@ def zscore_dataset(dataframe, excl_columns=None, by='site', nan_columns = zs_df.columns[zs_df.isnull().any()].tolist() if nan_columns: - LOG.warn('Columns %s contain NaNs after z-scoring.', ", ".join(nan_columns)) + LOG.warning('Columns %s contain NaNs after z-scoring.', ", ".join(nan_columns)) zs_df[nan_columns] = dataframe[nan_columns].values return zs_df diff --git a/mriqc/classifier/helper.py b/mriqc/classifier/helper.py index b9dc44df8..a6b4314d7 100644 --- a/mriqc/classifier/helper.py +++ b/mriqc/classifier/helper.py @@ -8,7 +8,6 @@ ^^^^^^^^^^^^^^^^^^^^^^^ """ -from __future__ import absolute_import, division, print_function, unicode_literals import os import numpy as np diff --git a/mriqc/classifier/sklearn/cv_nested.py b/mriqc/classifier/sklearn/cv_nested.py index 33eda08d3..d96fa6e22 100644 --- a/mriqc/classifier/sklearn/cv_nested.py +++ b/mriqc/classifier/sklearn/cv_nested.py @@ -13,7 +13,6 @@ """ -from __future__ import absolute_import, division, print_function, unicode_literals import warnings import numbers import time @@ -303,9 +302,9 @@ def nested_fit_and_score( test_score = error_score if return_train_score: train_score = error_score - LOG.warn("Classifier fit failed. The score on this train-test" - " partition for these parameters will be set to %f. " - "Details: \n%r", error_score, e) + LOG.warning("Classifier fit failed. The score on this train-test" + " partition for these parameters will be set to %f. " + "Details: \n%r", error_score, e) else: raise ValueError("error_score must be the string 'raise' or a" " numeric value. (Hint: if using 'raise', please" @@ -320,8 +319,8 @@ def nested_fit_and_score( test_score = _score(estimator, X_test, y_test, scorer) score_time = time.time() - start_time - fit_time else: - LOG.warn('Test set has no positive labels, scoring has been skipped ' - 'in this loop.') + LOG.warning('Test set has no positive labels, scoring has been skipped ' + 'in this loop.') if return_train_score: train_score = _score(estimator, X_train, y_train, scorer) diff --git a/mriqc/classifier/sklearn/parameters.py b/mriqc/classifier/sklearn/parameters.py index 1f8e3de17..0b94db698 100644 --- a/mriqc/classifier/sklearn/parameters.py +++ b/mriqc/classifier/sklearn/parameters.py @@ -13,7 +13,6 @@ """ -from __future__ import absolute_import, division, print_function, unicode_literals from itertools import product from collections import Mapping diff --git a/mriqc/classifier/sklearn/preprocessing.py b/mriqc/classifier/sklearn/preprocessing.py index fe4bc634a..f1fff9178 100644 --- a/mriqc/classifier/sklearn/preprocessing.py +++ b/mriqc/classifier/sklearn/preprocessing.py @@ -325,7 +325,7 @@ def fit(self, X, y, n_jobs=1): # comment out to force counter renditions of winnowing # noise_flag = False elif np.all(k * importances[-1] > importances[0:-1]): - LOG.warn('No features are better than noise') + LOG.warning('No features are better than noise') # noise better than all features aka no feature better than noise # Leave as separate if clause in case want to do something different than # when all feat > noise. Comment out to force counter renditions of winnowing diff --git a/mriqc/data/__init__.py b/mriqc/data/__init__.py index da5cdefd4..ba2efd7ce 100644 --- a/mriqc/data/__init__.py +++ b/mriqc/data/__init__.py @@ -2,6 +2,5 @@ # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: -from __future__ import absolute_import, division, print_function, unicode_literals from .config import Template, IndividualTemplate, GroupTemplate diff --git a/mriqc/data/config.py b/mriqc/data/config.py index 369c4dbf7..185002a4d 100644 --- a/mriqc/data/config.py +++ b/mriqc/data/config.py @@ -5,7 +5,6 @@ """ Utilities: Jinja2 templates """ -from __future__ import absolute_import, division, print_function, unicode_literals from io import open # pylint: disable=W0622 import jinja2 diff --git a/mriqc/data/mni/1mm_T2_brain.nii.gz b/mriqc/data/mni/1mm_T2_brain.nii.gz deleted file mode 100644 index 7629e4005..000000000 Binary files a/mriqc/data/mni/1mm_T2_brain.nii.gz and /dev/null differ diff --git a/mriqc/data/mni/2mm_T2_brain.nii.gz b/mriqc/data/mni/2mm_T2_brain.nii.gz deleted file mode 100644 index 88a03290e..000000000 Binary files a/mriqc/data/mni/2mm_T2_brain.nii.gz and /dev/null differ diff --git a/mriqc/data/testdata/group_T1w.tsv b/mriqc/data/testdata/group_T1w.tsv index 0e4b8cb07..a5d6a028e 100644 --- a/mriqc/data/testdata/group_T1w.tsv +++ b/mriqc/data/testdata/group_T1w.tsv @@ -1,5 +1,5 @@ -bids_name cjv cnr efc fber fwhm_avg fwhm_x fwhm_y fwhm_z icvs_csf icvs_gm icvs_wm inu_med inu_range provenance qi_1 qi_2 rpve_csf rpve_gm rpve_wm size_x size_y size_z snr_csf snr_gm snr_total snr_wm snrd_csf snrd_gm snrd_total snrd_wm spacing_x spacing_y spacing_z summary_bg_k summary_bg_mad summary_bg_mean summary_bg_median summary_bg_n summary_bg_p05 summary_bg_p95 summary_bg_stdv summary_csf_k summary_csf_mad summary_csf_mean summary_csf_median summary_csf_n summary_csf_p05 summary_csf_p95 summary_csf_stdv summary_gm_k summary_gm_mad summary_gm_mean summary_gm_median summary_gm_n summary_gm_p05 summary_gm_p95 summary_gm_stdv summary_wm_k summary_wm_mad summary_wm_mean summary_wm_median summary_wm_n summary_wm_p05 summary_wm_p95 summary_wm_stdv tpm_overlap_csf tpm_overlap_gm tpm_overlap_wm wm2max -sub-50137_T1w 0.38345367902512617 3.3392594802488205 0.7364744617160943 143.3969268798828 3.9717599999999997 3.84915 4.30615 3.75998 0.2133978898855149 0.42686969810291575 0.35973241201156936 1.2152518033981323 0.4519690752029422 {'md5sum': '57cd35190da3c813a3c3dadccd8a4ad7', 'mriqc_pred': 0, 'settings': {'testing': False}, 'software': 'mriqc', 'version': '8b0b1a01083bb794992cf0e42f1325bcda4bc22b', 'warnings': {'large_rot_frame': True, 'small_air_mask': False}} 0.0 0.0015353434426131694 16.44412079704881 8.760761342520016 12.312917440934429 208 256 176 1.2298851618661442 9.780251289684717 9.71615429906627 18.13832644564795 7.455938695630133 14.344398384030974 14.274251744697152 21.02241815443035 1.0 1.0 1.0 8.897744979078642 31.16443634033203 57.120849609375 52.41797256469727 955223.0 12.325603675842284 115.81150054931622 33.80640411376953 51.224218698434505 131.04031372070312 380.7245788574219 354.6744384765625 25681.0 158.8266143798828 552.8338623046875 288.37451171875 0.026355223848861357 68.94453430175781 684.1145629882812 682.354248046875 32575.0 571.0976440429688 801.4391540527344 69.76750946044922 0.3919089616950385 52.8669319152832 999.591064453125 1000.0235595703124 253466.0 908.4280853271484 1089.075714111328 55.1330680847168 0.22947660088539126 0.5153884887695312 0.553148090839386 0.4346056835375569 -sub-50152_T1w 0.3039255032198539 4.136308935592069 0.6948864997316359 141.25128173828125 3.465278460090917 3.4267453802727488 3.65075 3.31834 0.16868135537307122 0.4885912301853383 0.3427274144415905 0.9292771816253662 0.3650368571281435 {'md5sum': '27439008c5ad203d1fe19deef665bb11', 'mriqc_pred': 0, 'settings': {'testing': False}, 'software': 'mriqc', 'version': '8b0b1a01083bb794992cf0e42f1325bcda4bc22b', 'warnings': {'large_rot_frame': True, 'small_air_mask': False}} 0.0 0.006444494408151011 20.768276536956023 8.227114386622855 12.576371650369856 160 239 200 2.982304204233205 11.791153070535715 11.597888009517725 20.020206753784255 14.13385497368404 24.27361088493814 24.774273281536512 35.915353985987366 1.100000023841858 1.0 1.0 0.8981415463396036 18.241212844848636 54.22344589233398 52.11253356933594 1042416.0 27.100325107574463 88.64167785644531 18.99553680419922 7.371940288316537 119.54910278320312 401.8689270019531 393.5343322753906 15271.0 200.7536392211914 618.4881591796875 131.9521484375 0.5707499379506284 52.85783767700195 677.1936645507812 675.8594360351562 44244.0 585.3509674072267 775.0797363281248 57.31855010986328 0.8734180296762428 45.65824890136719 997.28564453125 1000.0049438476562 162045.0 909.9402221679687 1073.4810058593746 49.94962692260742 0.20446434617042544 0.5276362895965576 0.5144350528717041 0.5738063926509048 -sub-50785_T1w 0.3881841572763748 3.12056540871782 0.7756479415644941 596.0380859375 3.3521649972002363 3.199 3.611644991600707 3.24585 0.20414998904652734 0.4384699518998948 0.35738005905357784 1.3165277242660522 0.1928600192070007 {'md5sum': 'fd16630ba43611e54db04f8914016ef6', 'mriqc_pred': 0, 'settings': {'testing': False}, 'software': 'mriqc', 'version': '8b0b1a01083bb794992cf0e42f1325bcda4bc22b', 'warnings': {'large_rot_frame': True, 'small_air_mask': True}} 0.0 0.001395524194546639 25.763511237624744 12.151800259177813 17.077029805928472 256 180 256 2.2124050510080058 8.842233294683377 7.1247619568508025 10.319647524861024 7.97076273132748 18.799989172810566 19.29068185604401 31.101293663994003 1.0 0.999987542629242 1.0 8.887139629824803 21.064926147460934 36.30963897705078 19.8154239654541 59266.0 0.0 124.30063056945801 44.7416877746582 -0.1380615749962093 126.9127960205078 254.2424468994141 256.28790283203125 14368.0 67.84258117675782 435.2062957763672 115.8372802734375 0.11097776186414564 66.68869018554689 604.939453125 604.4854125976562 16249.0 493.0006713867188 717.1786499023436 68.361328125 1.874603456607331 86.84977722167969 1009.2825317382812 1000.015380859375 170016.0 868.9075317382812 1180.7556762695312 96.90373992919922 0.20513758063316345 0.495908796787262 0.5311647653579712 0.4600393346887888 -sub-51187_T1w 0.3422398269200667 3.7903684920664267 0.6250856477873908 357.52484130859375 3.7801451255770178 4.346218421569919 3.1878984798915484 3.8063184752695856 0.18837399720708245 0.4525009740272195 0.359125028765698 1.7580251693725586 0.6602846145629884 {'md5sum': '6db5cf300438e2b6303c2d054370c091', 'mriqc_pred': 0, 'settings': {'testing': False}, 'software': 'mriqc', 'version': '8b0b1a01083bb794992cf0e42f1325bcda4bc22b', 'warnings': {'large_rot_frame': True, 'small_air_mask': False}} 0.0 0.00018721926669037432 24.788834614717608 10.992975441201002 16.14208395065447 256 132 256 2.1998750852762163 8.231342517618167 7.723079514521209 12.73802094066924 9.154764245478695 18.28757409324397 19.53102444559356 31.150734998058013 0.8593999743461609 1.5000007152557373 0.8593999743461609 4.462557722769566 21.030975341796875 31.087656021118164 25.61327362060547 919057.0 1.6366852045059206 78.34020385742184 24.880678176879886 99.15187259411111 73.18208312988281 299.7581787109375 293.8832702636719 4277.0 153.52493896484376 419.7971374511718 133.57527160644528 0.2493147828634679 69.55706787109375 583.7290649414062 587.061767578125 20450.0 461.21322326660163 695.972280883789 71.31855010986328 0.8288354047164588 71.76368713378906 998.3399047851562 999.9907836914062 148399.0 864.3146362304688 1123.3076538085938 78.50414276123047 0.17862585186958313 0.4934021830558777 0.5213233232498169 0.35421248708597003 +bids_name cjv cnr efc fber fwhm_avg fwhm_x fwhm_y fwhm_z icvs_csf icvs_gm icvs_wm inu_med inu_range qi_1 qi_2 rpve_csf rpve_gm rpve_wm size_x size_y size_z snr_csf snr_gm snr_total snr_wm snrd_csf snrd_gm snrd_total snrd_wm spacing_x spacing_y spacing_z summary_bg_k summary_bg_mad summary_bg_mean summary_bg_median summary_bg_n summary_bg_p05 summary_bg_p95 summary_bg_stdv summary_csf_k summary_csf_mad summary_csf_mean summary_csf_median summary_csf_n summary_csf_p05 summary_csf_p95 summary_csf_stdv summary_gm_k summary_gm_mad summary_gm_mean summary_gm_median summary_gm_n summary_gm_p05 summary_gm_p95 summary_gm_stdv summary_wm_k summary_wm_mad summary_wm_mean summary_wm_median summary_wm_n summary_wm_p05 summary_wm_p95 summary_wm_stdv tpm_overlap_csf tpm_overlap_gm tpm_overlap_wm wm2max +sub-50137_T1w 0.39410944748537885 3.2284547299012294 0.7338947896018161 139.68072509765625 3.980563333333334 3.8641 4.31607 3.76152 0.21214345911374569 0.4279827869184353 0.35987375396781907 1.211256504058838 0.520178383588791 0.0 0.0024158064674279682 16.4987749836516 8.732285377558478 12.254671514331614 208 256 176 1.3639300791521773 9.31643863042417 9.489689780652435 17.788700632380962 7.343900250389147 13.76590146645663 13.770203606056839 20.200809101324737 1.0 1.0 1.0 10.5059587673101 32.43170166015625 58.779205322265625 53.95777893066406 958504.0 12.097606229782105 118.89846000671386 35.00423812866211 51.2896375582953 141.5131072998047 383.1445007324219 363.550537109375 27352.0 159.0480667114258 566.376348876953 266.54144287109375 0.07867725337348652 71.55709838867188 684.6166381835938 681.463623046875 33432.0 568.4105834960938 811.5688842773436 73.14527130126953 0.38182028350748354 53.98725509643555 999.6373291015625 1000.015625 254354.0 906.6515472412109 1091.05029296875 56.21622848510742 0.23151883482933044 0.516322910785675 0.552269697189331 0.4176320947677505 +sub-50152_T1w 0.30084630729527584 4.196789419738665 0.6976089502189017 117.18949890136719 3.4704078540988146 3.4172635622964433 3.66418 3.32978 0.17193203627678008 0.48627221274472665 0.3417957509784933 1.2196890115737915 0.48175038099288925 0.0 0.0062804338723095035 20.41377079756453 8.262620798718979 12.712614686607292 160 239 200 3.22213184281504 12.287255453480368 11.626687432054851 19.37067499986914 14.11720539949432 24.002584324073585 24.572277687213656 35.597043338073064 1.100000023841858 1.0 1.0 0.3452741197678941 18.404312133789062 58.82749557495117 57.34253692626953 1052422.0 30.933127593994143 91.81875877380371 18.62525177001953 0.8750442000651559 116.64398193359375 405.1227722167969 396.5852966308594 14945.0 217.74056091308594 611.2836303710938 123.07752990722656 0.48321151356524084 50.851158142089844 673.7911376953125 674.2886962890625 42022.0 582.4611907958983 764.5298126220704 54.876426696777344 0.8219264323848452 47.13913345336914 996.4799194335938 1000.004150390625 161135.0 904.3280700683595 1074.0524658203124 51.624481201171875 0.20640671253204346 0.5293527841567993 0.5178900957107544 0.5641955297888418 +sub-50785_T1w 0.38920401440814273 3.1356024319898337 0.7675473470182967 638.0956420898438 3.317354902273888 3.12753 3.588784706821664 3.23575 0.20061587115604937 0.44146474889129206 0.35791937995265855 1.0827370882034302 0.14907835721969587 0.0 0.0009692796019618615 25.73901434255412 11.953857126954743 16.766861099677158 256 180 256 2.0897413077758515 8.62508600647315 6.9134545157929965 10.025536233129987 8.604398999117091 20.90344339036962 21.44215561451884 34.81862445406981 1.0 0.9999875426292419 1.0 10.303404390279669 18.816082000732422 30.140827178955078 18.32184410095215 50295.0 0.0 107.15535659790027 38.09316635131836 0.2574148534152436 128.71408081054688 248.71217346191406 247.12576293945312 13528.0 65.22199630737305 436.29608459472655 118.25225830078125 0.12992571520503038 67.56988525390625 601.5120849609375 600.3649291992188 17894.0 488.4734298706055 716.7956359863281 69.60488891601562 2.049670114587223 87.97783660888672 1010.5941162109375 1000.0209350585938 171559.0 868.019952392578 1188.7272216796875 99.74708557128906 0.20611540973186493 0.4991275668144226 0.5288640260696411 0.39130861842447484 +sub-51187_T1w 0.3342548285375825 3.7990602588631157 0.6200364936367316 334.78863525390625 3.820146387241763 4.394763919877318 3.2175717990755404 3.8481034427724303 0.19203053992845864 0.44873235078229956 0.3592371092892418 1.1628636121749878 0.5994637340307234 0.0 0.00012127838191607572 24.806521493916108 11.220840921688177 16.405405922411813 256 132 256 3.2204014461590336 8.719992217298936 8.48251949844267 13.507164831870044 9.43009965419549 17.192225849779163 18.399573789191212 28.57639586359898 0.8593999743461609 1.5000007152557373 0.8593999743461609 4.665659068716778 22.925872802734375 33.94587707519531 27.766433715820312 920936.0 1.7564537823200226 86.2264404296875 27.478164672851562 73.00507761049263 84.56986236572266 327.6195068359375 329.9973449707031 4719.0 175.16026611328127 461.76874999999995 102.46001434326172 0.29266684281917543 66.38191986083984 601.6497802734375 601.6255493164062 19191.0 487.63885498046875 714.4779968261719 68.99201965332031 1.4337560901977104 66.77790832519531 1000.4205932617188 1000.0037231445312 146857.0 878.0049804687501 1119.2097167968748 74.03480529785156 0.17696388065814972 0.4949495792388916 0.527667224407196 0.3134800476705234 diff --git a/mriqc/interfaces/__init__.py b/mriqc/interfaces/__init__.py index 44aeb2a98..309a30999 100644 --- a/mriqc/interfaces/__init__.py +++ b/mriqc/interfaces/__init__.py @@ -3,12 +3,29 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ mriqc nipype interfaces """ -from __future__ import print_function, division, absolute_import, unicode_literals from .anatomical import \ StructuralQC, ArtifactMask, ComputeQI2, Harmonize, RotationMask from .functional import FunctionalQC, Spikes -from .bids import ReadSidecarJSON, IQMFileSink +from .bids import IQMFileSink from .viz import PlotMosaic, PlotContours, PlotSpikes from .common import ConformImage, EnsureSize from .webapi import UploadIQMs + + +__all__ = [ + 'ArtifactMask', + 'ComputeQI2', + 'ConformImage', + 'EnsureSize', + 'FunctionalQC', + 'Harmonize', + 'IQMFileSink', + 'PlotContours', + 'PlotMosaic', + 'PlotSpikes', + 'RotationMask', + 'Spikes', + 'StructuralQC', + 'UploadIQMs', +] diff --git a/mriqc/interfaces/anatomical.py b/mriqc/interfaces/anatomical.py index 57ce6e058..03f785953 100644 --- a/mriqc/interfaces/anatomical.py +++ b/mriqc/interfaces/anatomical.py @@ -7,7 +7,6 @@ # @Date: 2016-01-05 11:29:40 # @Email: code@oscaresteban.es """ Nipype interfaces to support anatomical workflow """ -from __future__ import print_function, division, absolute_import, unicode_literals import os.path as op import numpy as np import nibabel as nb @@ -78,7 +77,7 @@ class StructuralQC(SimpleInterface): def _run_interface(self, runtime): # pylint: disable=R0914,E1101 imnii = nb.load(self.inputs.in_noinu) - erode = np.all(np.array(imnii.get_header().get_zooms()[:3], + erode = np.all(np.array(imnii.header.get_zooms()[:3], dtype=np.float32) < 1.9) # Load image corrected for INU @@ -147,7 +146,7 @@ def _run_interface(self, runtime): # pylint: disable=R0914,E1101 ) # FWHM - fwhm = np.array(self.inputs.in_fwhm[:3]) / np.array(imnii.get_header().get_zooms()[:3]) + fwhm = np.array(self.inputs.in_fwhm[:3]) / np.array(imnii.header.get_zooms()[:3]) self._results['fwhm'] = { 'x': float(fwhm[0]), 'y': float(fwhm[1]), 'z': float(fwhm[2]), 'avg': float(np.average(fwhm))} @@ -164,7 +163,7 @@ def _run_interface(self, runtime): # pylint: disable=R0914,E1101 'z': int(inudata.shape[2])} self._results['spacing'] = { i: float(v) for i, v in zip( - ['x', 'y', 'z'], imnii.get_header().get_zooms()[:3])} + ['x', 'y', 'z'], imnii.header.get_zooms()[:3])} try: self._results['size']['t'] = int(inudata.shape[3]) @@ -172,7 +171,7 @@ def _run_interface(self, runtime): # pylint: disable=R0914,E1101 pass try: - self._results['spacing']['tr'] = float(imnii.get_header().get_zooms()[3]) + self._results['spacing']['tr'] = float(imnii.header.get_zooms()[3]) except IndexError: pass @@ -256,16 +255,16 @@ def _run_interface(self, runtime): self._results['out_art_msk'] = op.abspath('{}_art{}'.format(fname, ext)) self._results['out_air_msk'] = op.abspath('{}_air{}'.format(fname, ext)) - hdr = imnii.get_header().copy() + hdr = imnii.header.copy() hdr.set_data_dtype(np.uint8) - nb.Nifti1Image(qi1_img, imnii.get_affine(), hdr).to_filename( + nb.Nifti1Image(qi1_img, imnii.affine, hdr).to_filename( self._results['out_art_msk']) - nb.Nifti1Image(airdata, imnii.get_affine(), hdr).to_filename( + nb.Nifti1Image(airdata, imnii.affine, hdr).to_filename( self._results['out_hat_msk']) airdata[qi1_img > 0] = 0 - nb.Nifti1Image(airdata, imnii.get_affine(), hdr).to_filename( + nb.Nifti1Image(airdata, imnii.affine, hdr).to_filename( self._results['out_air_msk']) return runtime @@ -358,8 +357,7 @@ class RotationMask(SimpleInterface): def _run_interface(self, runtime): in_file = nb.load(self.inputs.in_file) data = in_file.get_data() - mask = np.zeros_like(data, dtype=np.uint8) - mask[data <= 0] = 1 + mask = data <= 0 # Pad one pixel to control behavior on borders of binary_opening mask = np.pad(mask, pad_width=(1,), mode='constant', constant_values=1) diff --git a/mriqc/interfaces/bids.py b/mriqc/interfaces/bids.py index 9c415c66d..3133e6635 100644 --- a/mriqc/interfaces/bids.py +++ b/mriqc/interfaces/bids.py @@ -1,7 +1,5 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: -from __future__ import print_function, division, absolute_import, unicode_literals -import os.path as op from pathlib import Path import re import simplejson as json @@ -10,71 +8,20 @@ traits, isdefined, TraitedSpec, DynamicTraitedSpec, BaseInterfaceInputSpec, File, Undefined, Str, SimpleInterface ) -from ..utils.misc import BIDS_COMP, BIDS_EXPR +from ..utils.misc import BIDS_COMP IFLOGGER = logging.getLogger('nipype.interface') -class ReadSidecarJSONInputSpec(BaseInterfaceInputSpec): - in_file = File(exists=True, mandatory=True, desc='the input nifti file') - fields = traits.List(Str, desc='get only certain fields') - - -class ReadSidecarJSONOutputSpec(TraitedSpec): - subject_id = Str() - session_id = Str() - task_id = Str() - acq_id = Str() - rec_id = Str() - run_id = Str() - out_dict = traits.Dict() - relative_path = Str() - - -class ReadSidecarJSON(SimpleInterface): - """ - An utility to find and read JSON sidecar files of a BIDS tree - """ - expr = re.compile(BIDS_EXPR) - input_spec = ReadSidecarJSONInputSpec - output_spec = ReadSidecarJSONOutputSpec - - def _run_interface(self, runtime): - metadata = get_metadata_for_nifti(self.inputs.in_file) - output_keys = [key for key in list(self.output_spec().get().keys()) if key.endswith('_id')] - outputs = self.expr.search(op.basename(self.inputs.in_file)).groupdict() - - for key in output_keys: - id_value = outputs.get(key) - if id_value is not None: - self._results[key] = outputs.get(key) - - if isdefined(self.inputs.fields) and self.inputs.fields: - for fname in self.inputs.fields: - self._results[fname] = metadata[fname] - else: - self._results['out_dict'] = metadata - - # Crawl back to the BIDS root - path = Path(self.inputs.in_file) - for i in range(1, 4): - if str(path.parents[i].name).startswith('sub-'): - bids_root = path.parents[i + 1] - break - - self._results['relative_path'] = str(path.relative_to(bids_root)) - return runtime - - class IQMFileSinkInputSpec(DynamicTraitedSpec, BaseInterfaceInputSpec): - in_file = Str(mandatory=True, desc='path of input file relative to BIDS root') + in_file = Str(mandatory=True, desc='path of input file') subject_id = Str(mandatory=True, desc='the subject id') modality = Str(mandatory=True, desc='the qc type') session_id = traits.Either(None, Str, usedefault=True) task_id = traits.Either(None, Str, usedefault=True) acq_id = traits.Either(None, Str, usedefault=True) rec_id = traits.Either(None, Str, usedefault=True) - run_id = traits.Either(None, Str, usedefault=True) + run_id = traits.Either(None, traits.Int, usedefault=True) dataset = Str(desc='dataset identifier') metadata = traits.Dict() provenance = traits.Dict() @@ -130,8 +77,15 @@ def _gen_outfile(self): if isdefined(self.inputs.out_dir): out_dir = Path(self.inputs.out_dir) + # Crawl back to the BIDS root + path = Path(self.inputs.in_file) + for i in range(1, 4): + if str(path.parents[i].name).startswith('sub-'): + bids_root = path.parents[i + 1] + break + in_file = str(path.relative_to(bids_root)) + # Build path and ensure directory exists - in_file = self.inputs.in_file bids_path = out_dir / in_file.replace( ''.join(Path(in_file).suffixes), '.json') bids_path.parent.mkdir(parents=True, exist_ok=True) @@ -161,7 +115,7 @@ def _run_interface(self, runtime): if isinstance(val, dict): self._out_dict.update(val) else: - IFLOGGER.warn( + IFLOGGER.warning( 'Output "%s" is not a dictionary (value="%s"), ' 'discarding output.', root_key, str(val)) @@ -200,63 +154,6 @@ def _run_interface(self, runtime): return runtime -def get_metadata_for_nifti(in_file): - """Fetchs metadata for a given nifi file""" - in_file = op.abspath(in_file) - - fname, ext = op.splitext(in_file) - if ext == '.gz': - fname, ext2 = op.splitext(fname) - ext = ext2 + ext - - side_json = fname + '.json' - fname_comps = op.basename(side_json).split("_") - - session_comp_list = [] - subject_comp_list = [] - top_comp_list = [] - ses = None - sub = None - - for comp in fname_comps: - if comp[:3] != "run": - session_comp_list.append(comp) - if comp[:3] == "ses": - ses = comp - else: - subject_comp_list.append(comp) - if comp[:3] == "sub": - sub = comp - else: - top_comp_list.append(comp) - - if any([comp.startswith('ses') for comp in fname_comps]): - bids_dir = '/'.join(op.dirname(in_file).split('/')[:-3]) - else: - bids_dir = '/'.join(op.dirname(in_file).split('/')[:-2]) - - top_json = op.join(bids_dir, "_".join(top_comp_list)) - potential_json = [top_json] - - subject_json = op.join(bids_dir, sub, "_".join(subject_comp_list)) - potential_json.append(subject_json) - - if ses: - session_json = op.join(bids_dir, sub, ses, "_".join(session_comp_list)) - potential_json.append(session_json) - - potential_json.append(side_json) - - merged_param_dict = {} - for json_file_path in potential_json: - if op.isfile(json_file_path): - with open(json_file_path, 'r') as jsonfile: - param_dict = json.load(jsonfile) - merged_param_dict.update(param_dict) - - return merged_param_dict - - def _process_name(name, val): if '.' in name: newkeys = name.split('.') diff --git a/mriqc/interfaces/common.py b/mriqc/interfaces/common.py index 7aa260f8d..d5848d4bc 100644 --- a/mriqc/interfaces/common.py +++ b/mriqc/interfaces/common.py @@ -3,7 +3,6 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: -from __future__ import print_function, division, absolute_import, unicode_literals from os import path as op from pkg_resources import resource_filename as pkgrf @@ -98,7 +97,7 @@ class ConformImage(SimpleInterface): def _run_interface(self, runtime): # Squeeze 4th dimension if possible (#660) nii = nb.squeeze_image(nb.load(self.inputs.in_file)) - hdr = nii.get_header().copy() + hdr = nii.header.copy() if self.inputs.check_ras: nii = nb.as_closest_canonical(nii) @@ -107,8 +106,8 @@ def _run_interface(self, runtime): datatype = int(hdr['datatype']) if datatype == 1: - IFLOGGER.warn('Input image %s has a suspicious data type "%s"', - self.inputs.in_file, hdr.get_data_dtype()) + IFLOGGER.warning('Input image %s has a suspicious data type "%s"', + self.inputs.in_file, hdr.get_data_dtype()) # signed char and bool to uint8 if datatype == 1 or datatype == 2 or datatype == 256: @@ -131,7 +130,7 @@ def _run_interface(self, runtime): if changed: hdr.set_data_dtype(dtype) nii = nb.Nifti1Image(nii.get_data().astype(dtype), - nii.get_affine(), hdr) + nii.affine, hdr) # Generate name out_file, ext = op.splitext(op.basename(self.inputs.in_file)) diff --git a/mriqc/interfaces/functional.py b/mriqc/interfaces/functional.py index 6598ee92f..349e5b04e 100644 --- a/mriqc/interfaces/functional.py +++ b/mriqc/interfaces/functional.py @@ -3,11 +3,9 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: -from __future__ import print_function, division, absolute_import, unicode_literals from os import path as op import numpy as np import nibabel as nb -from nilearn.signal import clean from builtins import zip from nipype.interfaces.base import ( @@ -123,7 +121,7 @@ def _run_interface(self, runtime): } # FWHM - fwhm = np.array(self.inputs.in_fwhm[:3]) / np.array(hmcnii.get_header().get_zooms()[:3]) + fwhm = np.array(self.inputs.in_fwhm[:3]) / np.array(hmcnii.header.get_zooms()[:3]) self._results['fwhm'] = { 'x': float(fwhm[0]), 'y': float(fwhm[1]), 'z': float(fwhm[2]), 'avg': float(np.average(fwhm))} @@ -134,7 +132,7 @@ def _run_interface(self, runtime): 'z': int(hmcdata.shape[2])} self._results['spacing'] = { i: float(v) for i, v in zip(['x', 'y', 'z'], - hmcnii.get_header().get_zooms()[:3])} + hmcnii.header.get_zooms()[:3])} try: self._results['size']['t'] = int(hmcdata.shape[3]) @@ -142,7 +140,7 @@ def _run_interface(self, runtime): pass try: - self._results['spacing']['tr'] = float(hmcnii.get_header().get_zooms()[3]) + self._results['spacing']['tr'] = float(hmcnii.header.get_zooms()[3]) except IndexError: pass @@ -187,10 +185,11 @@ def _run_interface(self, runtime): func_data = func_nii.get_data() func_shape = func_data.shape ntsteps = func_shape[-1] - tr = func_nii.get_header().get_zooms()[-1] + tr = func_nii.header.get_zooms()[-1] nskip = self.inputs.skip_frames if self.inputs.detrend: + from nilearn.signal import clean data = func_data.reshape(-1, ntsteps) clean_data = clean(data[:, nskip:].T, t_r=tr, standardize=False).T new_shape = ( diff --git a/mriqc/interfaces/tests/test_interfaces.py b/mriqc/interfaces/tests/test_interfaces.py index 525ba3ba1..602ca603b 100644 --- a/mriqc/interfaces/tests/test_interfaces.py +++ b/mriqc/interfaces/tests/test_interfaces.py @@ -11,7 +11,6 @@ """ Anatomical tests """ -# from __future__ import division, print_function, absolute_import, unicode_literals # import os.path as op # import numpy as np # import pytest diff --git a/mriqc/interfaces/transitional.py b/mriqc/interfaces/transitional.py index 575802307..518070fde 100644 --- a/mriqc/interfaces/transitional.py +++ b/mriqc/interfaces/transitional.py @@ -3,7 +3,6 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: -from __future__ import print_function, division, absolute_import, unicode_literals from nipype.interfaces.base import ( File, traits, CommandLine, TraitedSpec, CommandLineInputSpec ) diff --git a/mriqc/interfaces/viz.py b/mriqc/interfaces/viz.py index 0c7ca2dad..7d7562847 100644 --- a/mriqc/interfaces/viz.py +++ b/mriqc/interfaces/viz.py @@ -8,7 +8,6 @@ # @Email: code@oscaresteban.es # @Last modified by: oesteban """ Visualization interfaces """ -from __future__ import print_function, division, absolute_import, unicode_literals from pathlib import Path import numpy as np diff --git a/mriqc/interfaces/webapi.py b/mriqc/interfaces/webapi.py index be7985b80..2cfa3a7ca 100644 --- a/mriqc/interfaces/webapi.py +++ b/mriqc/interfaces/webapi.py @@ -2,7 +2,6 @@ # -*- coding: utf-8 -*- # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: -from __future__ import print_function, division, absolute_import, unicode_literals from nipype import logging from nipype.interfaces.base import ( @@ -154,7 +153,7 @@ def _run_interface(self, runtime): # response did not give us an ID errmsg = ('QC metrics upload failed to create an ID for the record ' 'uplOADED. rEsponse from server follows: {}'.format(response.text)) - IFLOGGER.warn(errmsg) + IFLOGGER.warning(errmsg) if response.status_code == 201: IFLOGGER.info('QC metrics successfully uploaded.') @@ -162,7 +161,7 @@ def _run_interface(self, runtime): errmsg = 'QC metrics failed to upload. Status %d: %s' % ( response.status_code, response.text) - IFLOGGER.warn(errmsg) + IFLOGGER.warning(errmsg) if self.inputs.strict: raise RuntimeError(response.text) @@ -185,19 +184,23 @@ def upload_qc_metrics(in_iqms, loc, path='', scheme='http', """ - from json import load, dumps + from pathlib import Path + from json import loads, dumps import requests - from io import open from copy import deepcopy if port is None: port = 443 if scheme == 'https' else 80 - with open(in_iqms, 'r') as input_json: - in_data = load(input_json) + in_data = loads(Path(in_iqms).read_text()) # Extract metadata and provenance meta = in_data.pop('bids_meta') + + # For compatibility with WebAPI. Shold be rolled back to int + if meta.get('run_id', None) is not None: + meta['run_id'] = '%d' % meta.get('run_id') + prov = in_data.pop('provenance') # At this point, data should contain only IQMs diff --git a/mriqc/qc/anatomical.py b/mriqc/qc/anatomical.py index fb205e4c9..7499fe31d 100644 --- a/mriqc/qc/anatomical.py +++ b/mriqc/qc/anatomical.py @@ -187,7 +187,6 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^ """ -from __future__ import absolute_import, division, print_function, unicode_literals import os.path as op from sys import version_info from math import pi, sqrt @@ -249,7 +248,7 @@ def snr_dietrich(mu_fg, sigma_air): """ if sigma_air < 1.0: from .. import MRIQC_LOG - MRIQC_LOG.warn('SNRd - background sigma is too small (%f)', sigma_air) + MRIQC_LOG.warning('SNRd - background sigma is too small (%f)', sigma_air) sigma_air += 1.0 return float(DIETRICH_FACTOR * mu_fg / sigma_air) @@ -581,8 +580,8 @@ def summary_stats(img, pvms, airmask=None, erode=True): nvox = float(mask.sum()) if nvox < 1e3: - MRIQC_LOG.warn('calculating summary stats of label "%s" in a very small ' - 'mask (%d voxels)', k, int(nvox)) + MRIQC_LOG.warning('calculating summary stats of label "%s" in a very small ' + 'mask (%d voxels)', k, int(nvox)) if k == 'bg': continue @@ -612,8 +611,8 @@ def summary_stats(img, pvms, airmask=None, erode=True): } if 'bg' in output and output['bg']['mad'] == 0.0 and output['bg']['stdv'] > 1.0: - MRIQC_LOG.warn('estimated MAD in the background was too small (' - 'MAD=%f)', output['bg']['mad']) + MRIQC_LOG.warning('estimated MAD in the background was too small (' + 'MAD=%f)', output['bg']['mad']) output['bg']['mad'] = output['bg']['stdv'] / DIETRICH_FACTOR return output diff --git a/mriqc/qc/functional.py b/mriqc/qc/functional.py index 66e6b6437..8f645dae3 100644 --- a/mriqc/qc/functional.py +++ b/mriqc/qc/functional.py @@ -189,7 +189,6 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^ """ -from __future__ import print_function, division, absolute_import, unicode_literals import os.path as op import numpy as np diff --git a/mriqc/qc/tests/test_anatomical.py b/mriqc/qc/tests/test_anatomical.py index abd1ebf6a..50995f22b 100644 --- a/mriqc/qc/tests/test_anatomical.py +++ b/mriqc/qc/tests/test_anatomical.py @@ -11,7 +11,6 @@ """ Anatomical tests """ -from __future__ import division, print_function, absolute_import, unicode_literals from tempfile import mkdtemp from shutil import rmtree import numpy as np diff --git a/mriqc/reports/__init__.py b/mriqc/reports/__init__.py index beec8656f..f661ba333 100644 --- a/mriqc/reports/__init__.py +++ b/mriqc/reports/__init__.py @@ -45,7 +45,6 @@ :show-inheritance: """ -from __future__ import print_function, division, absolute_import, unicode_literals from copy import deepcopy from .individual import individual_html from .group import gen_html as group_html diff --git a/mriqc/reports/group.py b/mriqc/reports/group.py index 05f61a772..340bfab56 100644 --- a/mriqc/reports/group.py +++ b/mriqc/reports/group.py @@ -9,7 +9,6 @@ # @Email: code@oscaresteban.es # @Last modified by: oesteban """ Encapsulates report generation functions """ -from __future__ import print_function, division, absolute_import, unicode_literals from sys import version_info import pandas as pd @@ -123,7 +122,7 @@ def gen_html(csv_file, mod, csv_failed=None, out_file=None): failed = None if csv_failed is not None and op.isfile(csv_failed): - MRIQC_REPORT_LOG.warn('Found failed-workflows table "%s"', csv_failed) + MRIQC_REPORT_LOG.warning('Found failed-workflows table "%s"', csv_failed) failed_df = pd.read_csv(csv_failed, index_col=False) cols = list(set(id_labels) & set(failed_df.columns.ravel().tolist())) diff --git a/mriqc/reports/individual.py b/mriqc/reports/individual.py index e73d292d1..c7221be2b 100644 --- a/mriqc/reports/individual.py +++ b/mriqc/reports/individual.py @@ -9,7 +9,6 @@ # @Email: code@oscaresteban.es # @Last modified by: oesteban """ Encapsulates report generation functions """ -from __future__ import print_function, division, absolute_import, unicode_literals def individual_html(in_iqms, in_plots=None, api_id=None): diff --git a/mriqc/reports/tests/test_reports.py b/mriqc/reports/tests/test_reports.py index bca5f432d..47846b19c 100644 --- a/mriqc/reports/tests/test_reports.py +++ b/mriqc/reports/tests/test_reports.py @@ -7,7 +7,6 @@ # @Date: 2016-01-05 11:33:39 # @Email: code@oscaresteban.es """Test utils""" -from __future__ import print_function, division, absolute_import, unicode_literals # import os.path as op # import pytest # from io import open # pylint: disable=W0622 diff --git a/mriqc/reports/utils.py b/mriqc/reports/utils.py index 72acc3b60..029264dba 100644 --- a/mriqc/reports/utils.py +++ b/mriqc/reports/utils.py @@ -9,7 +9,6 @@ # @Last modified by: oesteban # @Last Modified time: 2017-05-25 13:41:58 """ Helpers in report generation""" -from __future__ import print_function, division, absolute_import, unicode_literals def iqms2html(indict, table_id): diff --git a/mriqc/utils/__init__.py b/mriqc/utils/__init__.py index 1fe2e5e3a..d6719cc3e 100644 --- a/mriqc/utils/__init__.py +++ b/mriqc/utils/__init__.py @@ -3,6 +3,5 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Module utils.misc contains utilities """ -from __future__ import print_function, division, absolute_import, unicode_literals from .misc import reorder_csv from .bids import collect_bids_data diff --git a/mriqc/utils/bids.py b/mriqc/utils/bids.py index f65593f94..23b5dc850 100644 --- a/mriqc/utils/bids.py +++ b/mriqc/utils/bids.py @@ -3,7 +3,6 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """PyBIDS tooling""" -from __future__ import print_function, division, absolute_import, unicode_literals from collections import defaultdict DEFAULT_TYPES = ['bold', 'T1w', 'T2w'] @@ -30,7 +29,7 @@ def collect_bids_data(layout, participant_label=None, session=None, run=None, imaging_data = defaultdict(list, {}) for btype in bids_type: imaging_data[btype] = layout.get( - type=btype, + suffix=btype, return_type='file', extensions=['nii', 'nii.gz'], **basequery) diff --git a/mriqc/utils/misc.py b/mriqc/utils/misc.py index 3aebf5cb4..77de29387 100644 --- a/mriqc/utils/misc.py +++ b/mriqc/utils/misc.py @@ -3,12 +3,15 @@ # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Helper functions """ -from __future__ import print_function, division, absolute_import, unicode_literals from pathlib import Path -import collections +from collections import OrderedDict import json import pandas as pd +try: + from collections.abc import MutableMapping +except ImportError: + from collections import MutableMapping IMTYPES = { 'T1w': 'anat', @@ -16,7 +19,7 @@ 'bold': 'func', } -BIDS_COMP = collections.OrderedDict([ +BIDS_COMP = OrderedDict([ ('subject_id', 'sub'), ('session_id', 'ses'), ('task_id', 'task'), ('acq_id', 'acq'), ('rec_id', 'rec'), ('run_id', 'run') ]) @@ -181,8 +184,7 @@ def generate_tsv(output_dir, mod): def _read_and_save(in_file): - with open(in_file, 'r') as jsondata: - data = json.load(jsondata) + data = json.loads(Path(in_file).read_text()) return data if data else None @@ -190,7 +192,7 @@ def _flatten(in_dict, parent_key='', sep='_'): items = [] for k, val in list(in_dict.items()): new_key = parent_key + sep + k if parent_key else k - if isinstance(val, collections.MutableMapping): + if isinstance(val, MutableMapping): items.extend(list(_flatten(val, new_key, sep=sep).items())) else: items.append((new_key, val)) diff --git a/mriqc/viz/misc.py b/mriqc/viz/misc.py index e9e8d9ccd..9c6f4a6f3 100644 --- a/mriqc/viz/misc.py +++ b/mriqc/viz/misc.py @@ -8,7 +8,6 @@ # @Email: code@oscaresteban.es # @Last modified by: oesteban """ Helper functions for the figures in the paper """ -from __future__ import print_function, division, absolute_import, unicode_literals import os.path as op import numpy as np import pandas as pd diff --git a/mriqc/viz/svg.py b/mriqc/viz/svg.py index e0f68e7b1..279ae445b 100644 --- a/mriqc/viz/svg.py +++ b/mriqc/viz/svg.py @@ -8,7 +8,6 @@ # @Email: code@oscaresteban.es # @Last modified by: oesteban """ SVG handling utilities """ -from __future__ import print_function, division, absolute_import, unicode_literals def svg2str(display_object, dpi=300): diff --git a/mriqc/viz/utils.py b/mriqc/viz/utils.py index a5459819c..4a03b8574 100644 --- a/mriqc/viz/utils.py +++ b/mriqc/viz/utils.py @@ -8,7 +8,6 @@ # @Email: code@oscaresteban.es # @Last modified by: oesteban """ Visualization utilities """ -from __future__ import print_function, division, absolute_import, unicode_literals import math import os.path as op diff --git a/mriqc/workflows/__init__.py b/mriqc/workflows/__init__.py index 3738db0dc..b756ccd7f 100644 --- a/mriqc/workflows/__init__.py +++ b/mriqc/workflows/__init__.py @@ -17,6 +17,5 @@ """ -from __future__ import print_function, division, absolute_import, unicode_literals from .anatomical import anat_qc_workflow from .functional import fmri_qc_workflow diff --git a/mriqc/workflows/anatomical.py b/mriqc/workflows/anatomical.py index a14724cf0..3b2bc30cb 100644 --- a/mriqc/workflows/anatomical.py +++ b/mriqc/workflows/anatomical.py @@ -25,7 +25,6 @@ .. workflow:: - import os.path as op from niworkflows.anat.skullstrip import afni_wf wf = afni_wf() @@ -36,13 +35,14 @@ from nipype.interfaces import io as nio from nipype.interfaces import utility as niu from nipype.interfaces import fsl, ants -from niworkflows.data import get_mni_icbm152_nlin_asym_09c -from niworkflows.anat.skullstrip import afni_wf as skullstrip_wf +from templateflow.api import get as get_template +from niworkflows.interfaces.bids import ReadSidecarJSON from niworkflows.interfaces.registration import RobustMNINormalizationRPT as RobustMNINormalization +from niworkflows.anat.skullstrip import afni_wf as skullstrip_wf from .. import DEFAULTS, logging -from ..interfaces import (StructuralQC, ArtifactMask, ReadSidecarJSON, - ConformImage, ComputeQI2, IQMFileSink, RotationMask) +from ..interfaces import (StructuralQC, ArtifactMask, ConformImage, + ComputeQI2, IQMFileSink, RotationMask) from .utils import get_fwhmx @@ -158,16 +158,13 @@ def anat_qc_workflow(dataset, settings, mod='T1w', name='anatMRIQC'): def spatial_normalization(settings, mod='T1w', name='SpatialNormalization', - resolution=2.0): + resolution=2): """ A simple workflow to perform spatial normalization """ - from niworkflows.data import getters as niwgetters - # Have some settings handy - tpl_id = settings.get('template_id', 'mni_icbm152_nlin_asym_09c') - mni_template = Path(getattr(niwgetters, 'get_{}'.format(tpl_id))()) + tpl_id = settings.get('template_id', 'MNI152NLin2009cAsym') # Define workflow interface workflow = pe.Workflow(name=name) @@ -183,7 +180,7 @@ def spatial_normalization(settings, mod='T1w', name='SpatialNormalization', float=settings.get('ants_float', False), template=tpl_id, template_resolution=2, - reference=mod[:2], + reference=mod, generate_report=True,), name='SpatialNormalization', # Request all MultiProc processes when ants_nthreads > n_procs @@ -191,7 +188,7 @@ def spatial_normalization(settings, mod='T1w', name='SpatialNormalization', settings.get('n_procs', 1)), mem_gb=3) norm.inputs.reference_mask = str( - mni_template / ('%dmm_brainmask.nii.gz' % int(resolution))) + get_template(tpl_id, resolution=resolution, desc='brain', suffix='mask')) workflow.connect([ (inputnode, norm, [('moving_image', 'moving_image'), @@ -254,9 +251,8 @@ def compute_iqms(settings, modality='T1w', name='ComputeIQMs'): dimension=3, default_value=0, interpolation='Linear', float=True), iterfield=['input_image'], name='MNItpms2t1') - invt.inputs.input_image = [ - str(Path(get_mni_icbm152_nlin_asym_09c()) / (fname + '.nii.gz')) - for fname in ['1mm_tpm_csf', '1mm_tpm_gm', '1mm_tpm_wm']] + invt.inputs.input_image = [str(p) for p in get_template( + 'MNI152NLin2009cAsym', suffix='probseg', resolution=1, label='CSF|GM|WM')] datasink = pe.Node(IQMFileSink( modality=modality, out_dir=str(settings['output_dir']), @@ -269,14 +265,14 @@ def _getwm(inlist): workflow.connect([ (inputnode, meta, [('in_file', 'in_file')]), - (meta, datasink, [('relative_path', 'in_file'), - ('subject_id', 'subject_id'), - ('session_id', 'session_id'), - ('acq_id', 'acq_id'), - ('rec_id', 'rec_id'), - ('run_id', 'run_id'), + (inputnode, datasink, [('in_file', 'in_file')]), + (meta, datasink, [('subject', 'subject_id'), + ('session', 'session_id'), + ('task', 'task_id'), + ('acquisition', 'acq_id'), + ('reconstruction', 'rec_id'), + ('run', 'run_id'), ('out_dict', 'metadata')]), - (inputnode, addprov, [('in_file', 'in_file'), ('airmask', 'air_msk'), ('rotmask', 'rot_msk')]), @@ -488,11 +484,11 @@ def airmsk_wf(name='AirMaskWorkflow'): rotmsk = pe.Node(RotationMask(), name='RotationMask') - invt = pe.Node(ants.ApplyTransforms(dimension=3, default_value=0, - interpolation='Linear', float=True), name='invert_xfm') - invt.inputs.input_image = str(Path(get_mni_icbm152_nlin_asym_09c()) / '1mm_headmask.nii.gz') - - binarize = pe.Node(niu.Function(function=_binarize), name='Binarize') + invt = pe.Node(ants.ApplyTransforms( + dimension=3, default_value=0, interpolation='MultiLabel', float=True), + name='invert_xfm') + invt.inputs.input_image = str(get_template( + 'MNI152NLin2009cAsym', resolution=1, desc='head', suffix='mask')) qi1 = pe.Node(ArtifactMask(), name='ArtifactMask') @@ -503,8 +499,7 @@ def airmsk_wf(name='AirMaskWorkflow'): (rotmsk, qi1, [('out_file', 'rot_mask')]), (inputnode, invt, [('in_mask', 'reference_image'), ('inverse_composite_transform', 'transforms')]), - (invt, binarize, [('output_image', 'in_file')]), - (binarize, qi1, [('out', 'nasion_post_mask')]), + (invt, qi1, [('output_image', 'nasion_post_mask')]), (qi1, outputnode, [('out_hat_msk', 'hat_mask'), ('out_air_msk', 'air_mask'), ('out_art_msk', 'art_mask')]), @@ -599,7 +594,7 @@ def _enhance(in_file, out_file=None): data[excess] = 0 data[excess] = np.random.choice(data[data > range_min], size=len(excess[0])) - nb.Nifti1Image(data, imnii.get_affine(), imnii.get_header()).to_filename( + nb.Nifti1Image(data, imnii.affine, imnii.header).to_filename( out_file) return out_file @@ -628,7 +623,7 @@ def image_gradient(in_file, snr, out_file=None): grad *= 100. grad /= gradmax - nb.Nifti1Image(grad, imnii.get_affine(), imnii.get_header()).to_filename(out_file) + nb.Nifti1Image(grad, imnii.affine, imnii.header).to_filename(out_file) return out_file @@ -650,7 +645,7 @@ def gradient_threshold(in_file, in_segm, thresh=1.0, out_file=None): imnii = nb.load(in_file) - hdr = imnii.get_header().copy() + hdr = imnii.header.copy() hdr.set_data_dtype(np.uint8) # pylint: disable=no-member data = imnii.get_data().astype(np.float32) @@ -676,5 +671,5 @@ def gradient_threshold(in_file, in_segm, thresh=1.0, out_file=None): mask = sim.binary_fill_holes(mask, struc).astype(np.uint8) # pylint: disable=no-member - nb.Nifti1Image(mask, imnii.get_affine(), hdr).to_filename(out_file) + nb.Nifti1Image(mask, imnii.affine, hdr).to_filename(out_file) return out_file diff --git a/mriqc/workflows/core.py b/mriqc/workflows/core.py index aeb38b84a..b66faa142 100644 --- a/mriqc/workflows/core.py +++ b/mriqc/workflows/core.py @@ -7,7 +7,6 @@ # @Date: 2016-01-05 11:24:05 # @Email: code@oscaresteban.es """ The core module combines the existing workflows """ -from __future__ import print_function, division, absolute_import, unicode_literals import os from .anatomical import anat_qc_workflow diff --git a/mriqc/workflows/functional.py b/mriqc/workflows/functional.py index 7cf4ad240..d3cf4b641 100644 --- a/mriqc/workflows/functional.py +++ b/mriqc/workflows/functional.py @@ -23,7 +23,6 @@ This workflow is orchestrated by :py:func:`fmri_qc_workflow`. """ -from __future__ import print_function, division, absolute_import, unicode_literals from pathlib import Path from nipype.pipeline import engine as pe @@ -32,6 +31,7 @@ from nipype.interfaces import utility as niu from nipype.interfaces import afni, ants, fsl +from niworkflows.interfaces.bids import ReadSidecarJSON from niworkflows.interfaces import segmentation as nws from niworkflows.interfaces import registration as nwr from niworkflows.interfaces import utils as niutils @@ -39,7 +39,7 @@ from .utils import get_fwhmx from .. import DEFAULTS, logging -from ..interfaces import ReadSidecarJSON, FunctionalQC, Spikes, IQMFileSink +from ..interfaces import FunctionalQC, Spikes, IQMFileSink DEFAULT_FD_RADIUS = 50. @@ -160,8 +160,9 @@ def fmri_qc_workflow(dataset, settings, name='funcMRIQC'): melodic = pe.Node(nws.MELODICRPT(no_bet=True, no_mask=True, no_mm=True, + compress_report=False, generate_report=True), - name="ICA", mem_gb=biggest_file_gb * 5) + name="ICA", mem_gb=max(biggest_file_gb * 5, 8)) workflow.connect([ (sanitize, melodic, [('out_file', 'in_files')]), (skullstrip_epi, melodic, [('outputnode.out_file', 'report_mask')]), @@ -270,16 +271,16 @@ def compute_iqms(settings, name='ComputeIQMs'): name='datasink', run_without_submitting=True) workflow.connect([ - (inputnode, datasink, [('exclude_index', 'dummy_trs')]), + (inputnode, datasink, [('in_file', 'in_file'), + ('exclude_index', 'dummy_trs')]), (inputnode, meta, [('in_file', 'in_file')]), (inputnode, addprov, [('in_file', 'in_file')]), - (meta, datasink, [('relative_path', 'in_file'), - ('subject_id', 'subject_id'), - ('session_id', 'session_id'), - ('task_id', 'task_id'), - ('acq_id', 'acq_id'), - ('rec_id', 'rec_id'), - ('run_id', 'run_id'), + (meta, datasink, [('subject', 'subject_id'), + ('session', 'session_id'), + ('task', 'task_id'), + ('acquisition', 'acq_id'), + ('reconstruction', 'rec_id'), + ('run', 'run_id'), ('out_dict', 'metadata')]), (addprov, datasink, [('out', 'provenance')]), (outliers, datasink, [(('out_file', _parse_tout), 'aor')]), @@ -680,55 +681,54 @@ def epi_mni_align(settings, name='SpatialNormalization'): wf = epi_mni_align({}) """ - from niworkflows.data import get_mni_icbm152_nlin_asym_09c as get_template + from templateflow.api import get as get_template from niworkflows.interfaces.registration import ( RobustMNINormalizationRPT as RobustMNINormalization ) - from pkg_resources import resource_filename as pkgrf # Get settings testing = settings.get('testing', False) n_procs = settings.get('n_procs', 1) ants_nthreads = settings.get('ants_nthreads', DEFAULTS['ants_nthreads']) - # Init template - mni_template = get_template() - workflow = pe.Workflow(name=name) inputnode = pe.Node(niu.IdentityInterface(fields=['epi_mean', 'epi_mask']), name='inputnode') outputnode = pe.Node(niu.IdentityInterface( fields=['epi_mni', 'epi_parc', 'report']), name='outputnode') - epimask = pe.Node(fsl.ApplyMask(), name='EPIApplyMask') - - n4itk = pe.Node(ants.N4BiasFieldCorrection(dimension=3), name='SharpenEPI') + n4itk = pe.Node(ants.N4BiasFieldCorrection(dimension=3, copy_header=True), + name='SharpenEPI') norm = pe.Node(RobustMNINormalization( - num_threads=ants_nthreads, - float=settings.get('ants_float', False), - template='mni_icbm152_nlin_asym_09c', - reference_image=pkgrf('mriqc', 'data/mni/2mm_T2_brain.nii.gz'), + explicit_masking=False, flavor='testing' if testing else 'precise', - moving='EPI', - generate_report=True,), - name='EPI2MNI', - num_threads=n_procs, - mem_gb=3) + float=settings.get('ants_float', False), + generate_report=True, + moving='bold', + num_threads=ants_nthreads, + reference='boldref', + reference_image=str(get_template( + 'MNI152NLin2009cAsym', resolution=2, suffix='boldref')), + reference_mask=str(get_template( + 'MNI152NLin2009cAsym', resolution=2, desc='brain', suffix='mask')), + template='MNI152NLin2009cAsym', + template_resolution=2, ), + name='EPI2MNI', num_threads=n_procs, mem_gb=3) # Warp segmentation into EPI space invt = pe.Node(ants.ApplyTransforms( float=True, - input_image=str(Path(mni_template) / '1mm_parc.nii.gz'), - dimension=3, default_value=0, interpolation='NearestNeighbor'), + input_image=str(get_template('MNI152NLin2009cAsym', resolution=1, + desc='carpet', suffix='dseg')), + dimension=3, default_value=0, interpolation='MultiLabel'), name='ResampleSegmentation') workflow.connect([ (inputnode, invt, [('epi_mean', 'reference_image')]), (inputnode, n4itk, [('epi_mean', 'input_image')]), - (inputnode, epimask, [('epi_mask', 'mask_file')]), - (n4itk, epimask, [('output_image', 'in_file')]), - (epimask, norm, [('out_file', 'moving_image')]), + (inputnode, norm, [('epi_mask', 'moving_mask')]), + (n4itk, norm, [('output_image', 'moving_image')]), (norm, invt, [ ('inverse_composite_transform', 'transforms')]), (invt, outputnode, [('output_image', 'epi_parc')]), @@ -791,8 +791,8 @@ def spikes_mask(in_file, in_mask=None, out_file=None): new_mask_3d[:, 0:2, :] = True new_mask_3d[:, -3:-1, :] = True - mask_nii = nb.Nifti1Image(new_mask_3d.astype(np.uint8), in_4d_nii.get_affine(), - in_4d_nii.get_header()) + mask_nii = nb.Nifti1Image(new_mask_3d.astype(np.uint8), in_4d_nii.affine, + in_4d_nii.header) mask_nii.to_filename(out_file) plot_roi(mask_nii, mean_img(in_4d_nii), output_file=out_plot) diff --git a/mriqc/workflows/utils.py b/mriqc/workflows/utils.py index 355667ac6..cbf24deab 100644 --- a/mriqc/workflows/utils.py +++ b/mriqc/workflows/utils.py @@ -8,7 +8,6 @@ # @Email: code@oscaresteban.es # @Last modified by: oesteban """Helper functions for the workflows""" -from __future__ import print_function, division, absolute_import, unicode_literals from distutils.version import StrictVersion from builtins import range @@ -60,7 +59,7 @@ def thresh_image(in_file, thres=0.5, out_file=None): data[data < thres] = 0 data[data > 0] = 1 nb.Nifti1Image( - data, im.get_affine(), im.get_header()).to_filename(out_file) + data, im.affine, im.header).to_filename(out_file) return out_file diff --git a/requirements.txt b/requirements.txt index 0e53e428a..f3c1e1ba9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ -niworkflows>=0.4.2,<0.5 -pybids<=0.6.5 +niworkflows<0.9.0a0,>=0.8.2 +templateflow<0.2.0a0,>=0.1.7 +xvfbwrapper diff --git a/versioneer.py b/versioneer.py index 64fea1c89..26bf9a06c 100644 --- a/versioneer.py +++ b/versioneer.py @@ -276,7 +276,6 @@ """ -from __future__ import print_function try: import configparser except ImportError: