diff --git a/.circleci/ds005_partial_fasttrack_outputs.txt b/.circleci/ds005_partial_fasttrack_outputs.txt index 0b8299351..5969fdf59 100644 --- a/.circleci/ds005_partial_fasttrack_outputs.txt +++ b/.circleci/ds005_partial_fasttrack_outputs.txt @@ -14,11 +14,17 @@ sub-01/anat/sub-01_desc-ribbon_mask.json sub-01/anat/sub-01_desc-ribbon_mask.nii.gz sub-01/anat/sub-01_hemi-L_desc-preproc_sphere.surf.gii sub-01/anat/sub-01_hemi-L_desc-preproc_white.surf.gii +sub-01/anat/sub-01_hemi-L_space-fsLR_den-32k_desc-preproc_midthickness.surf.gii +sub-01/anat/sub-01_hemi-L_space-fsLR_den-32k_desc-preproc_pial.surf.gii +sub-01/anat/sub-01_hemi-L_space-fsLR_den-32k_desc-preproc_white.surf.gii sub-01/anat/sub-01_hemi-L_space-fsLR_desc-msmsulc_sphere.surf.gii sub-01/anat/sub-01_hemi-L_space-fsLR_desc-reg_sphere.surf.gii sub-01/anat/sub-01_hemi-L_space-fsaverage_desc-reg_sphere.surf.gii sub-01/anat/sub-01_hemi-R_desc-preproc_sphere.surf.gii sub-01/anat/sub-01_hemi-R_desc-preproc_white.surf.gii +sub-01/anat/sub-01_hemi-R_space-fsLR_den-32k_desc-preproc_midthickness.surf.gii +sub-01/anat/sub-01_hemi-R_space-fsLR_den-32k_desc-preproc_pial.surf.gii +sub-01/anat/sub-01_hemi-R_space-fsLR_den-32k_desc-preproc_white.surf.gii sub-01/anat/sub-01_hemi-R_space-fsLR_desc-msmsulc_sphere.surf.gii sub-01/anat/sub-01_hemi-R_space-fsLR_desc-reg_sphere.surf.gii sub-01/anat/sub-01_hemi-R_space-fsaverage_desc-reg_sphere.surf.gii diff --git a/.circleci/ds005_partial_outputs.txt b/.circleci/ds005_partial_outputs.txt index 5ee91468c..eca181b99 100644 --- a/.circleci/ds005_partial_outputs.txt +++ b/.circleci/ds005_partial_outputs.txt @@ -25,6 +25,9 @@ sub-01/anat/sub-01_from-T1w_to-MNI152NLin2009cAsym_mode-image_xfm.h5 sub-01/anat/sub-01_from-T1w_to-MNI152NLin6Asym_mode-image_xfm.h5 sub-01/anat/sub-01_hemi-L_midthickness.surf.gii sub-01/anat/sub-01_hemi-L_pial.surf.gii +sub-01/anat/sub-01_hemi-L_space-fsLR_den-32k_midthickness.surf.gii +sub-01/anat/sub-01_hemi-L_space-fsLR_den-32k_pial.surf.gii +sub-01/anat/sub-01_hemi-L_space-fsLR_den-32k_white.surf.gii sub-01/anat/sub-01_hemi-L_space-fsLR_desc-msmsulc_sphere.surf.gii sub-01/anat/sub-01_hemi-L_space-fsLR_desc-reg_sphere.surf.gii sub-01/anat/sub-01_hemi-L_space-fsaverage_desc-reg_sphere.surf.gii @@ -34,6 +37,9 @@ sub-01/anat/sub-01_hemi-L_thickness.shape.gii sub-01/anat/sub-01_hemi-L_white.surf.gii sub-01/anat/sub-01_hemi-R_midthickness.surf.gii sub-01/anat/sub-01_hemi-R_pial.surf.gii +sub-01/anat/sub-01_hemi-R_space-fsLR_den-32k_midthickness.surf.gii +sub-01/anat/sub-01_hemi-R_space-fsLR_den-32k_pial.surf.gii +sub-01/anat/sub-01_hemi-R_space-fsLR_den-32k_white.surf.gii sub-01/anat/sub-01_hemi-R_space-fsLR_desc-msmsulc_sphere.surf.gii sub-01/anat/sub-01_hemi-R_space-fsLR_desc-reg_sphere.surf.gii sub-01/anat/sub-01_hemi-R_space-fsaverage_desc-reg_sphere.surf.gii diff --git a/fmriprep/workflows/base.py b/fmriprep/workflows/base.py index 1cdac46ac..7ffa8b32e 100644 --- a/fmriprep/workflows/base.py +++ b/fmriprep/workflows/base.py @@ -156,13 +156,14 @@ def init_single_subject_wf(subject_id: str): from smriprep.workflows.outputs import ( init_ds_anat_volumes_wf, init_ds_grayord_metrics_wf, + init_ds_surfaces_wf, init_template_iterator_wf, ) from smriprep.workflows.surfaces import ( init_gifti_morphometrics_wf, init_hcp_morphometrics_wf, init_morph_grayords_wf, - init_resample_midthickness_wf, + init_resample_surfaces_wf, ) from fmriprep.workflows.bold.base import init_bold_wf @@ -449,7 +450,8 @@ def init_single_subject_wf(subject_id: str): grayord_density=config.workflow.cifti_output, omp_nthreads=omp_nthreads, ) - resample_midthickness_wf = init_resample_midthickness_wf( + resample_surfaces_wf = init_resample_surfaces_wf( + surfaces=['white', 'pial', 'midthickness'], grayord_density=config.workflow.cifti_output, ) ds_grayord_metrics_wf = init_ds_grayord_metrics_wf( @@ -458,6 +460,15 @@ def init_single_subject_wf(subject_id: str): metrics=['curv', 'thickness', 'sulc'], cifti_output=config.workflow.cifti_output, ) + ds_fsLR_surfaces_wf = init_ds_surfaces_wf( + output_dir=fmriprep_dir, + surfaces=['white', 'pial', 'midthickness'], + entities={ + 'space': 'fsLR', + 'density': '32k' if config.workflow.cifti_output == '91k' else '59k', + }, + name='ds_fsLR_surfaces_wf', + ) workflow.connect([ (anat_fit_wf, curv_wf, [ @@ -473,7 +484,9 @@ def init_single_subject_wf(subject_id: str): (curv_wf, hcp_morphometrics_wf, [ ('outputnode.curv', 'inputnode.curv'), ]), - (anat_fit_wf, resample_midthickness_wf, [ + (anat_fit_wf, resample_surfaces_wf, [ + ('outputnode.white', 'inputnode.white'), + ('outputnode.pial', 'inputnode.pial'), ('outputnode.midthickness', 'inputnode.midthickness'), ( f"outputnode.sphere_reg_{'msm' if msm_sulc else 'fsLR'}", @@ -493,12 +506,15 @@ def init_single_subject_wf(subject_id: str): ('outputnode.sulc', 'inputnode.sulc'), ('outputnode.roi', 'inputnode.roi'), ]), - (resample_midthickness_wf, morph_grayords_wf, [ + (resample_surfaces_wf, morph_grayords_wf, [ ('outputnode.midthickness_fsLR', 'inputnode.midthickness_fsLR'), ]), (anat_fit_wf, ds_grayord_metrics_wf, [ ('outputnode.t1w_valid_list', 'inputnode.source_files'), ]), + (anat_fit_wf, ds_fsLR_surfaces_wf, [ + ('outputnode.t1w_valid_list', 'inputnode.source_files'), + ]), (morph_grayords_wf, ds_grayord_metrics_wf, [ ('outputnode.curv_fsLR', 'inputnode.curv'), ('outputnode.curv_metadata', 'inputnode.curv_metadata'), @@ -507,6 +523,11 @@ def init_single_subject_wf(subject_id: str): ('outputnode.sulc_fsLR', 'inputnode.sulc'), ('outputnode.sulc_metadata', 'inputnode.sulc_metadata'), ]), + (resample_surfaces_wf, ds_fsLR_surfaces_wf, [ + ('outputnode.white_fsLR', 'inputnode.white'), + ('outputnode.pial_fsLR', 'inputnode.pial'), + ('outputnode.midthickness_fsLR', 'inputnode.midthickness'), + ]), ]) # fmt:skip if config.workflow.anat_only: @@ -740,7 +761,7 @@ def init_single_subject_wf(subject_id: str): (hcp_morphometrics_wf, bold_wf, [ ('outputnode.roi', 'inputnode.cortex_mask'), ]), - (resample_midthickness_wf, bold_wf, [ + (resample_surfaces_wf, bold_wf, [ ('outputnode.midthickness_fsLR', 'inputnode.midthickness_fsLR'), ]), ]) # fmt:skip diff --git a/pyproject.toml b/pyproject.toml index 6469d770a..b56eea969 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,7 +34,7 @@ dependencies = [ "pybids >= 0.16", "requests >= 2.27", "sdcflows >= 2.10.0", - "smriprep >= 0.16.0", + "smriprep @ git+https://github.com/nipreps/smriprep.git", "tedana >= 23.0.2", "templateflow >= 24.2.2", "transforms3d >= 0.4", diff --git a/scripts/fetch_templates.py b/scripts/fetch_templates.py index c9b134cbc..68ab5403e 100755 --- a/scripts/fetch_templates.py +++ b/scripts/fetch_templates.py @@ -16,7 +16,9 @@ def fetch_MNI2009(): Expected templates: tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_T1w.nii.gz + tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_T2w.nii.gz tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_T1w.nii.gz + tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_T2w.nii.gz tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_desc-brain_mask.nii.gz tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-02_desc-brain_mask.nii.gz tpl-MNI152NLin2009cAsym/tpl-MNI152NLin2009cAsym_res-01_desc-carpet_dseg.nii.gz @@ -25,7 +27,7 @@ def fetch_MNI2009(): """ template = 'MNI152NLin2009cAsym' - tf.get(template, resolution=(1, 2), desc=None, suffix='T1w') + tf.get(template, resolution=(1, 2), desc=None, suffix=['T1w', 'T2w']) tf.get(template, resolution=(1, 2), desc='brain', suffix='mask') tf.get(template, resolution=1, atlas=None, desc='carpet', suffix='dseg') tf.get(template, resolution=2, desc='fMRIPrep', suffix='boldref')