diff --git a/src/fmripost_aroma/workflows/base.py b/src/fmripost_aroma/workflows/base.py index 0f5aabf..f79995b 100644 --- a/src/fmripost_aroma/workflows/base.py +++ b/src/fmripost_aroma/workflows/base.py @@ -288,9 +288,7 @@ def init_single_run_wf(bold_file): """Set up a single-run workflow for fMRIPost-AROMA.""" from nipype.interfaces import utility as niu from niworkflows.engine.workflows import LiterateWorkflow as Workflow - from niworkflows.interfaces.utility import KeySelect from niworkflows.utils.spaces import Reference - from smriprep.workflows.outputs import init_template_iterator_wf from fmripost_aroma.utils.bids import collect_derivatives, extract_entities from fmripost_aroma.workflows.aroma import init_denoise_wf, init_ica_aroma_wf @@ -417,84 +415,6 @@ def init_single_run_wf(bold_file): ]), ]) # fmt:skip - # Skip this for now - if config.workflow.denoise_method and spaces.get_spaces() and False: - templates = spaces.get_spaces() - template_iterator_wf = init_template_iterator_wf( - spaces=spaces, - sloppy=config.execution.sloppy, - ) - template_iterator_wf.inputs.inputnode.anat2std_xfm = functional_cache[ - 'anat2outputspaces_xfm' - ] - template_iterator_wf.inputs.inputnode.template = templates - - # Now denoise the output-space BOLD data using ICA-AROMA - denoise_std_wf = init_denoise_wf(bold_file=bold_file) - denoise_std_wf.inputs.inputnode.skip_vols = skip_vols - - workflow.connect([ - (ica_aroma_wf, denoise_std_wf, [ - ('outputnode.mixing', 'inputnode.mixing'), - ('outputnode.aroma_features', 'inputnode.classifications'), - ]), - (template_iterator_wf, denoise_std_wf, [ - ('outputnode.space', 'inputnode.space'), - ('outputnode.cohort', 'inputnode.cohort'), - ('outputnode.res', 'inputnode.res'), - ]), - ]) # fmt:skip - - if functional_cache['bold_outputspaces']: - # No transforms necessary - std_buffer = pe.Node( - KeySelect( - fields=['bold', 'bold_mask'], - keys=[str(space) for space in spaces.references], - ), - name='std_buffer', - ) - std_buffer.inputs.bold = functional_cache['bold_outputspaces'] - std_buffer.inputs.bold_mask = functional_cache['bold_mask_outputspaces'] - workflow.connect([ - (template_iterator_wf, std_buffer, [('outputnode.space', 'key')]), - (std_buffer, denoise_std_wf, [ - ('bold', 'inputnode.bold_file'), - ('bold_mask', 'inputnode.bold_mask'), - ]), - ]) # fmt:skip - else: - # Warp native BOLD to requested output spaces - xfms = [ - functional_cache['hmc'], - functional_cache['boldref2fmap'], - functional_cache['bold2anat'], - ] - all_xfms = pe.Node(niu.Merge(2), name='all_xfms') - all_xfms.inputs.in1 = xfms - workflow.connect([ - (template_iterator_wf, all_xfms, [('outputnode.anat2std_xfm', 'in2')]), - ]) # fmt:skip - - resample_std_wf = init_resample_volumetric_wf( - bold_file=bold_file, - functional_cache=functional_cache, - run_stc=False, - name=_get_wf_name(bold_file, 'resample_std'), - ) - workflow.connect([ - (template_iterator_wf, resample_std_wf, [ - ('outputnode.space', 'inputnode.space'), - ('outputnode.res', 'inputnode.res'), - ('outputnode.cohort', 'inputnode.cohort'), - ]), - (all_xfms, resample_std_wf, [('out', 'inputnode.transforms')]), - (resample_std_wf, denoise_std_wf, [ - ('outputnode.bold_std', 'inputnode.bold'), - ('outputnode.bold_mask_std', 'inputnode.bold_mask'), - ]), - ]) # fmt:skip - return workflow