1
1
# -*- coding: utf-8 -*-
2
2
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
3
3
# vi: set ft=python sts=4 ts=4 sw=4 et:
4
- """This commandline module provides classes for interfacing with the
5
- `ICA-AROMA.py<https://github.com/rhr-pruim/ICA-AROMA>`_ command line tool.
4
+ """This commandline module provides classes for interfacing with the
5
+ `ICA-AROMA.py<https://github.com/rhr-pruim/ICA-AROMA>`_ command line tool.
6
6
Change directory to provide relative paths for doctests
7
7
>>> import os
8
8
>>> filepath = os.path.dirname(os.path.realpath(__file__))
23
23
24
24
class ICA_AROMAInputSpec (CommandLineInputSpec ):
25
25
feat_dir = Directory (exists = True , mandatory = True ,
26
- argstr = '-feat %s' ,
26
+ argstr = '-feat %s' ,
27
27
xor = ['in_file' , 'mat_file' , 'fnirt_warp_file' , 'motion_parameters' ],
28
28
desc = 'If a feat directory exists and temporal filtering '
29
29
'has not been run yet, ICA_AROMA can use the files in '
30
30
'this directory.' )
31
- in_file = File (exists = True , mandatory = True ,
32
- argstr = '-i %s' , xor = ['feat_dir' ],
31
+ in_file = File (exists = True , mandatory = True ,
32
+ argstr = '-i %s' , xor = ['feat_dir' ],
33
33
desc = 'volume to be denoised' )
34
34
out_dir = Directory ('out' , mandatory = True ,
35
- argstr = '-o %s' ,
35
+ argstr = '-o %s' ,
36
36
desc = 'output directory' )
37
- mask = File (exists = True , argstr = '-m %s' , xor = ['feat_dir' ],
37
+ mask = File (exists = True , argstr = '-m %s' , xor = ['feat_dir' ],
38
38
desc = 'path/name volume mask' )
39
39
dim = traits .Int (argstr = '-dim %d' ,
40
40
desc = 'Dimensionality reduction when running '
@@ -65,31 +65,31 @@ class ICA_AROMAInputSpec(CommandLineInputSpec):
65
65
'-both: both aggressive and non-aggressive denoising (two outputs)' )
66
66
67
67
class ICA_AROMAOutputSpec (TraitedSpec ):
68
- aggr_denoised_file = File (exists = True ,
68
+ aggr_denoised_file = File (exists = True ,
69
69
desc = 'if generated: aggressively denoised volume' )
70
70
nonaggr_denoised_file = File (exists = True ,
71
71
desc = 'if generated: non aggressively denoised volume' )
72
- out_dir = Directory (exists = True ,
72
+ out_dir = Directory (exists = True ,
73
73
desc = 'directory contains (in addition to the denoised files): '
74
74
'melodic.ica + classified_motion_components + '
75
75
'classification_overview + feature_scores + melodic_ic_mni)' )
76
-
76
+
77
77
class ICA_AROMA (CommandLine ):
78
78
"""
79
79
Interface for the ICA_AROMA.py script.
80
-
81
- ICA-AROMA (i.e. 'ICA-based Automatic Removal Of Motion Artifacts') concerns
80
+
81
+ ICA-AROMA (i.e. 'ICA-based Automatic Removal Of Motion Artifacts') concerns
82
82
a data-driven method to identify and remove motion-related independent
83
83
components from fMRI data. To that end it exploits a small, but robust
84
84
set of theoretically motivated features, preventing the need for classifier
85
- re-training and therefore providing direct and easy applicability.
85
+ re-training and therefore providing direct and easy applicability.
86
86
87
87
See link for further documentation: https://github.com/rhr-pruim/ICA-AROMA
88
88
89
89
Example
90
90
-------
91
91
92
- >>> from nipype.interfaces.fsl import ICA_AROMA
92
+ >>> from nipype.interfaces.fsl import ICA_AROMA
93
93
>>> from nipype.testing import example_data
94
94
>>> AROMA_obj = ICA_AROMA.ICA_AROMA()
95
95
>>> AROMA_obj.inputs.in_file = 'functional.nii'
@@ -114,5 +114,5 @@ def _list_outputs(self):
114
114
outputs ['aggr_denoised_file' ] = os .path .join (out_dir , 'denoised_func_data_aggr.nii.gz' )
115
115
if self .inputs .denoise_type in ('nonaggr' , 'both' ):
116
116
outputs ['nonaggr_denoised_file' ] = os .path .join (out_dir , 'denoised_func_data_nonaggr.nii.gz' )
117
-
117
+
118
118
return outputs
0 commit comments