Skip to content

Commit

Permalink
More work.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Aug 8, 2024
1 parent 7cdf2d3 commit 5cc9d48
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 27 deletions.
6 changes: 6 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

Usage Notes
===========

.. warning::
*fMRIPost-AROMA* requires preprocessing outputs in MNI152NLin6Asym space with
2 mm3 voxels (i.e., ``res-02``).
Make sure you run fMRIPrep with ``--output-spaces MNI152NLin6Asym:res-02``.

.. warning::
*fMRIPost-AROMA* includes a tracking system to report usage statistics and errors
for debugging and grant reporting purposes.
Expand Down
7 changes: 1 addition & 6 deletions src/fmripost_aroma/interfaces/resampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,7 @@ class _ResamplerOutputSpec(TraitedSpec):


class Resampler(SimpleInterface):
"""Extract timeseries and compute connectivity matrices.
Write out time series using Nilearn's NiftiLabelMasker
Then write out functional correlation matrix of
timeseries using numpy.
"""
"""Apply the resampler workflow."""

input_spec = _ResamplerInputSpec
output_spec = _ResamplerOutputSpec
Expand Down
42 changes: 21 additions & 21 deletions src/fmripost_aroma/workflows/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,27 @@ def init_single_run_wf(bold_file):
),
)

config.loggers.workflow.info(

Check warning on line 346 in src/fmripost_aroma/workflows/base.py

View check run for this annotation

Codecov / codecov/patch

src/fmripost_aroma/workflows/base.py#L346

Added line #L346 was not covered by tests
(
f'Collected run data for {os.path.basename(bold_file)}:\n'
f'{yaml.dump(functional_cache, default_flow_style=False, indent=4)}'
),
)

if config.workflow.dummy_scans is not None:
skip_vols = config.workflow.dummy_scans

Check warning on line 354 in src/fmripost_aroma/workflows/base.py

View check run for this annotation

Codecov / codecov/patch

src/fmripost_aroma/workflows/base.py#L354

Added line #L354 was not covered by tests
else:
if not functional_cache['confounds']:
raise ValueError(

Check warning on line 357 in src/fmripost_aroma/workflows/base.py

View check run for this annotation

Codecov / codecov/patch

src/fmripost_aroma/workflows/base.py#L357

Added line #L357 was not covered by tests
'No confounds detected. '
'Automatical dummy scan detection cannot be performed. '
'Please set the `--dummy-scans` flag explicitly.'
)
skip_vols = get_nss(functional_cache['confounds'])

Check warning on line 362 in src/fmripost_aroma/workflows/base.py

View check run for this annotation

Codecov / codecov/patch

src/fmripost_aroma/workflows/base.py#L362

Added line #L362 was not covered by tests

ica_aroma_wf.inputs.inputnode.confounds = functional_cache['confounds']
ica_aroma_wf.inputs.inputnode.skip_vols = skip_vols

Check warning on line 365 in src/fmripost_aroma/workflows/base.py

View check run for this annotation

Codecov / codecov/patch

src/fmripost_aroma/workflows/base.py#L364-L365

Added lines #L364 - L365 were not covered by tests

mni6_buffer = pe.Node(
niu.IdentityInterface(
fields=['bold_mni152nlin6asym', 'bold_mask_mni152nlin6asym'],
Expand Down Expand Up @@ -381,27 +402,6 @@ def init_single_run_wf(bold_file):
]),
]) # fmt:skip

config.loggers.workflow.info(
(
f'Collected run data for {os.path.basename(bold_file)}:\n'
f'{yaml.dump(functional_cache, default_flow_style=False, indent=4)}'
),
)

if config.workflow.dummy_scans is not None:
skip_vols = config.workflow.dummy_scans
else:
if not functional_cache['confounds']:
raise ValueError(
'No confounds detected. '
'Automatical dummy scan detection cannot be performed. '
'Please set the `--dummy-scans` flag explicitly.'
)
skip_vols = get_nss(functional_cache['confounds'])

ica_aroma_wf.inputs.inputnode.confounds = functional_cache['confounds']
ica_aroma_wf.inputs.inputnode.skip_vols = skip_vols

if config.workflow.denoise_method:
# Now denoise the output-space BOLD data using ICA-AROMA
denoise_wf = init_denoise_wf(bold_file=bold_file)
Expand Down

0 comments on commit 5cc9d48

Please sign in to comment.