diff --git a/.circleci/config.yml b/.circleci/config.yml index 878d6406b..5a1dc17ef 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,7 +14,7 @@ jobs: steps: - checkout - restore_cache: - key: conda-py37-v1-{{ checksum "dev_requirements.txt" }} + key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}-{{ checksum "requirements.txt" }} - run: name: Generate environment command: | @@ -24,7 +24,7 @@ jobs: pip install -r dev_requirements.txt fi - save_cache: - key: conda-py37-v1-{{ checksum "dev_requirements.txt" }} + key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}-{{ checksum "requirements.txt" }} paths: - /opt/conda/envs/tedana_py37 @@ -35,7 +35,7 @@ jobs: steps: - checkout - restore_cache: - key: conda-py35-v1-{{ checksum "dev_requirements.txt" }} + key: conda-py35-v1-{{ checksum "dev_requirements.txt" }}-{{ checksum "requirements.txt" }} - run: name: Generate environment command: | @@ -53,7 +53,7 @@ jobs: mkdir /tmp/src/coverage mv /tmp/src/tedana/.coverage /tmp/src/coverage/.coverage.py35 - save_cache: - key: conda-py35-v1-{{ checksum "dev_requirements.txt" }} + key: conda-py35-v1-{{ checksum "dev_requirements.txt" }}-{{ checksum "requirements.txt" }} paths: - /opt/conda/envs/tedana_py35 - persist_to_workspace: @@ -68,7 +68,7 @@ jobs: steps: - checkout - restore_cache: - key: conda-py36-v1-{{ checksum "dev_requirements.txt" }} + key: conda-py36-v1-{{ checksum "dev_requirements.txt" }}-{{ checksum "requirements.txt" }} - run: name: Generate environment command: | @@ -86,7 +86,7 @@ jobs: mkdir /tmp/src/coverage mv /tmp/src/tedana/.coverage /tmp/src/coverage/.coverage.py36 - save_cache: - key: conda-py36-v1-{{ checksum "dev_requirements.txt" }} + key: conda-py36-v1-{{ checksum "dev_requirements.txt" }}-{{ checksum "requirements.txt" }} paths: - /opt/conda/envs/tedana_py36 - persist_to_workspace: @@ -101,7 +101,7 @@ jobs: steps: - checkout - restore_cache: - key: conda-py37-v1-{{ checksum "dev_requirements.txt" }} + key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}-{{ checksum "requirements.txt" }} - run: name: Running unit tests command: | @@ -122,7 +122,7 @@ jobs: steps: - checkout - restore_cache: - key: conda-py37-v1-{{ checksum "dev_requirements.txt" }} + key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}-{{ checksum "requirements.txt" }} - run: name: Style check command: | @@ -137,7 +137,7 @@ jobs: steps: - checkout - restore_cache: - key: conda-py37-v1-{{ checksum "dev_requirements.txt" }} + key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}-{{ checksum "requirements.txt" }} - run: name: Run integration tests no_output_timeout: 40m @@ -161,7 +161,7 @@ jobs: steps: - checkout - restore_cache: - key: conda-py37-v1-{{ checksum "dev_requirements.txt" }} + key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}-{{ checksum "requirements.txt" }} - run: name: Run integration tests no_output_timeout: 40m @@ -185,7 +185,7 @@ jobs: steps: - checkout - restore_cache: - key: conda-py37-v1-{{ checksum "dev_requirements.txt" }} + key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}-{{ checksum "requirements.txt" }} - run: name: Run integration tests no_output_timeout: 40m @@ -211,7 +211,7 @@ jobs: at: /tmp - checkout - restore_cache: - key: conda-py37-v1-{{ checksum "dev_requirements.txt" }} + key: conda-py37-v1-{{ checksum "dev_requirements.txt" }}-{{ checksum "requirements.txt" }} - run: name: Merge coverage files command: | diff --git a/dev_requirements.txt b/dev_requirements.txt index 4e0e0881c..429e89412 100644 --- a/dev_requirements.txt +++ b/dev_requirements.txt @@ -2,7 +2,7 @@ sphinx sphinx-argparse sphinx_rtd_theme -coverage +coverage<5.0 flake8>=3.7 numpydoc pytest diff --git a/requirements.txt b/requirements.txt index 774e8fd8e..04071bf1f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ duecredit matplotlib -nibabel>=2.1.0 -nilearn -numpy>=1.14 +nibabel>=2.5.1 +nilearn>=0.5.2 +numpy>=1.15 pandas -scikit-learn -scipy +scikit-learn>=0.22 +scipy>=1.3.3 diff --git a/tedana/metrics/kundu_fit.py b/tedana/metrics/kundu_fit.py index 65a7c5f52..10f963783 100644 --- a/tedana/metrics/kundu_fit.py +++ b/tedana/metrics/kundu_fit.py @@ -91,7 +91,7 @@ def dependence_metrics(catd, tsoc, mmix, t2s, tes, ref_img, 't2s ({1})'.format(catd.shape[2], t2s.shape[1])) RepLGR.info("A series of TE-dependence metrics were calculated for " - "each ICA component, including Kappa, Rho, and variance " + "each component, including Kappa, Rho, and variance " "explained.") # mask everything we can diff --git a/tedana/tests/data/cornell_three_echo_outputs.txt b/tedana/tests/data/cornell_three_echo_outputs.txt index a6959045b..533661bba 100644 --- a/tedana/tests/data/cornell_three_echo_outputs.txt +++ b/tedana/tests/data/cornell_three_echo_outputs.txt @@ -40,6 +40,42 @@ figures/comp_032.png figures/comp_033.png figures/comp_034.png figures/comp_035.png +figures/comp_036.png +figures/comp_037.png +figures/comp_038.png +figures/comp_039.png +figures/comp_040.png +figures/comp_041.png +figures/comp_042.png +figures/comp_043.png +figures/comp_044.png +figures/comp_045.png +figures/comp_046.png +figures/comp_047.png +figures/comp_048.png +figures/comp_049.png +figures/comp_050.png +figures/comp_051.png +figures/comp_052.png +figures/comp_053.png +figures/comp_054.png +figures/comp_055.png +figures/comp_056.png +figures/comp_057.png +figures/comp_058.png +figures/comp_059.png +figures/comp_060.png +figures/comp_061.png +figures/comp_062.png +figures/comp_063.png +figures/comp_064.png +figures/comp_065.png +figures/comp_066.png +figures/comp_067.png +figures/comp_068.png +figures/comp_069.png +figures/comp_070.png +figures/comp_071.png dn_ts_OC.nii.gz feats_OC2.nii.gz figures diff --git a/tedana/tests/data/fiu_four_echo_outputs.txt b/tedana/tests/data/fiu_four_echo_outputs.txt index 0b16df50c..3b1b645ff 100644 --- a/tedana/tests/data/fiu_four_echo_outputs.txt +++ b/tedana/tests/data/fiu_four_echo_outputs.txt @@ -1,22 +1,46 @@ +T1gs.nii.gz adaptive_mask.nii.gz betas_OC.nii.gz -betas_hik_OC.nii.gz +betas_hik_OC_T1c.nii.gz dn_ts_OC.nii.gz -feats_OC2.nii.gz -figures -hik_ts_OC.nii.gz +dn_ts_OC_T1c.nii.gz +dn_ts_e1.nii.gz +dn_ts_e2.nii.gz +dn_ts_e3.nii.gz +dn_ts_e4.nii.gz +glsig.1D +hik_ts_OC_T1c.nii.gz ica_components.nii.gz ica_decomposition.json ica_mixing.tsv -ica_orth_mixing.tsv lowk_ts_OC.nii.gz +lowk_ts_e1.nii.gz +lowk_ts_e2.nii.gz +lowk_ts_e3.nii.gz +lowk_ts_e4.nii.gz +meica_R2_pred.nii.gz +meica_S0_pred.nii.gz +meica_betas_catd.nii.gz +meica_metric_weights.nii.gz +meica_mix_T1c.1D +mepca_R2_pred.nii.gz +mepca_S0_pred.nii.gz +mepca_betas_catd.nii.gz +mepca_metric_weights.nii.gz pca_components.nii.gz pca_decomposition.json pca_mixing.tsv report.txt s0v.nii.gz +s0vG.nii.gz +sphis_hik.nii.gz t2sv.nii.gz +t2svG.nii.gz ts_OC.nii.gz +ts_OC_whitened.nii.gz +tsoc_nogs.nii.gz +tsoc_orig.nii.gz +figures figures/Component_Overview.png figures/Kappa_vs_Rho_Scatter.png figures/Kappa_Rho_Scree_plot.png @@ -41,27 +65,3 @@ figures/comp_017.png figures/comp_018.png figures/comp_019.png figures/comp_020.png -figures/comp_021.png -figures/comp_022.png -figures/comp_023.png -figures/comp_024.png -figures/comp_025.png -figures/comp_026.png -figures/comp_027.png -figures/comp_028.png -figures/comp_029.png -figures/comp_030.png -figures/comp_031.png -figures/comp_032.png -figures/comp_033.png -figures/comp_034.png -figures/comp_035.png -figures/comp_036.png -figures/comp_037.png -figures/comp_038.png -figures/comp_039.png -figures/comp_040.png -figures/comp_041.png -figures/comp_042.png -figures/comp_043.png -figures/comp_044.png diff --git a/tedana/tests/data/nih_five_echo_outputs_verbose.txt b/tedana/tests/data/nih_five_echo_outputs_verbose.txt index 12d062799..58332ee5b 100644 --- a/tedana/tests/data/nih_five_echo_outputs_verbose.txt +++ b/tedana/tests/data/nih_five_echo_outputs_verbose.txt @@ -1,19 +1,14 @@ -T1gs.nii.gz adaptive_mask.nii.gz betas_OC.nii.gz betas_hik_OC.nii.gz -betas_hik_OC_T1c.nii.gz dn_ts_OC.nii.gz -dn_ts_OC_T1c.nii.gz dn_ts_e1.nii.gz dn_ts_e2.nii.gz dn_ts_e3.nii.gz dn_ts_e4.nii.gz dn_ts_e5.nii.gz feats_OC2.nii.gz -glsig.1D hik_ts_OC.nii.gz -hik_ts_OC_T1c.nii.gz hik_ts_e1.nii.gz hik_ts_e2.nii.gz hik_ts_e3.nii.gz @@ -22,6 +17,7 @@ hik_ts_e5.nii.gz ica_components.nii.gz ica_decomposition.json ica_mixing.tsv +ica_orth_mixing.tsv lowk_ts_OC.nii.gz lowk_ts_e1.nii.gz lowk_ts_e2.nii.gz @@ -32,7 +28,6 @@ meica_R2_pred.nii.gz meica_S0_pred.nii.gz meica_betas_catd.nii.gz meica_metric_weights.nii.gz -meica_mix_T1c.1D mepca_R2_pred.nii.gz mepca_S0_pred.nii.gz mepca_betas_catd.nii.gz @@ -43,13 +38,10 @@ pca_mixing.tsv report.txt s0v.nii.gz s0vG.nii.gz -sphis_hik.nii.gz t2sv.nii.gz t2svG.nii.gz ts_OC.nii.gz ts_OC_whitened.nii.gz -tsoc_nogs.nii.gz -tsoc_orig.nii.gz figures figures/Component_Overview.png figures/Kappa_vs_Rho_Scatter.png @@ -117,3 +109,11 @@ figures/comp_059.png figures/comp_060.png figures/comp_061.png figures/comp_062.png +figures/comp_063.png +figures/comp_064.png +figures/comp_065.png +figures/comp_066.png +figures/comp_067.png +figures/comp_068.png +figures/comp_069.png +figures/comp_070.png diff --git a/tedana/tests/test_integration.py b/tedana/tests/test_integration.py index 129aadb9f..5f020dcbd 100644 --- a/tedana/tests/test_integration.py +++ b/tedana/tests/test_integration.py @@ -90,10 +90,9 @@ def test_integration_five_echo(skip_integration): data=datalist, tes=[15.4, 29.7, 44.0, 58.3, 72.6], out_dir=out_dir, - tedpca='mdl', - gscontrol=['gsr', 't1c'], - png_cmap='bone', - debug=True, + tedpca='aic', + fittype='curvefit', + tedort=True, verbose=True) # Just a check on the component table pending a unit test of load_comptable @@ -124,12 +123,15 @@ def test_integration_four_echo(skip_integration): prepend += 'sub-PILOT_ses-01_task-localizerDetection_run-01_echo-' suffix = '_space-sbref_desc-preproc_bold+orig.HEAD' datalist = [prepend + str(i + 1) + suffix for i in range(4)] - tedana_workflow(data=datalist, - tes=[11.8, 28.04, 44.28, 60.52], - out_dir=out_dir, - tedpca='aic', - fittype='curvefit', - tedort=True) + tedana_workflow( + data=datalist, + tes=[11.8, 28.04, 44.28, 60.52], + out_dir=out_dir, + tedpca='kundu-stabilize', + gscontrol=['gsr', 't1c'], + png_cmap='bone', + debug=True, + verbose=True) # compare the generated output files fn = resource_filename('tedana', 'tests/data/fiu_four_echo_outputs.txt') @@ -155,7 +157,7 @@ def test_integration_three_echo(skip_integration): tes=[14.5, 38.5, 62.5], out_dir=out_dir, low_mem=True, - tedpca='kundu-stabilize') + tedpca='mdl') # test rerunning the workflow tedana_workflow(