Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEAT: Save CIFTI subcortical volumes #357

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions nibabies/workflows/bold/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ def init_func_preproc_wf(bold_file, spaces, has_fieldmap=False, existing_derivat
"bold_mask_native",
"bold_echos_native",
"bold_cifti",
"bold_rois",
"bold2anat_xfm",
"cifti_metadata",
"surfaces",
Expand Down Expand Up @@ -456,6 +457,7 @@ def init_func_preproc_wf(bold_file, spaces, has_fieldmap=False, existing_derivat
('nonaggr_denoised_file', 'inputnode.nonaggr_denoised_file'),
('bold_cifti', 'inputnode.bold_cifti'),
('cifti_metadata', 'inputnode.cifti_metadata'),
('bold_rois', 'inputnode.bold_rois'),
('t2star_bold', 'inputnode.t2star_bold'),
('t2star_t1', 'inputnode.t2star_t1'),
('t2star_std', 'inputnode.t2star_std'),
Expand Down Expand Up @@ -991,6 +993,8 @@ def init_func_preproc_wf(bold_file, spaces, has_fieldmap=False, existing_derivat
(subcortical_rois_wf, subcortical_mni_alignment_wf, [
("outputnode.MNIInfant_rois", "inputnode.MNIInfant_rois"),
("outputnode.MNI152_rois", "inputnode.MNI152_rois")]),
(subcortical_mni_alignment_wf, outputnode, [
("outputnode.subcortical_volume", "bold_rois")]),

# CIFTI surface sampling
(inputnode, bold_fsLR_resampling_wf, [
Expand Down
22 changes: 21 additions & 1 deletion nibabies/workflows/bold/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
"bold_mask_native",
"cifti_metadata",
"cifti_density",
"bold_rois",
"confounds",
"confounds_metadata",
"goodvoxels_mask",
Expand Down Expand Up @@ -823,12 +824,31 @@
mem_gb=config.DEFAULT_MEMORY_MIN_GB,
)

ds_bold_subcortical = pe.Node(

Check warning on line 827 in nibabies/workflows/bold/outputs.py

View check run for this annotation

Codecov / codecov/patch

nibabies/workflows/bold/outputs.py#L827

Added line #L827 was not covered by tests
DerivativesDataSink(
base_directory=output_dir,
suffix="bold",
compress=True,
TaskName=metadata.get("TaskName"),
space="fsLR",
desc="rois",
**timing_parameters,
),
name="ds_bold_subcortical",
run_without_submitting=True,
mem_gb=config.DEFAULT_MEMORY_MIN_GB,
)

# fmt: off
workflow.connect([
(inputnode, ds_bold_cifti, [(('bold_cifti', _unlist), 'in_file'),
('source_file', 'source_file'),
('cifti_density', 'density'),
(('cifti_metadata', _read_json), 'meta_dict')])
(('cifti_metadata', _read_json), 'meta_dict')]),
(inputnode, ds_bold_subcortical, [
('bold_rois', 'in_file'),
('source_file', 'source_file')]),

])
# fmt: on

Expand Down
Loading