11# -*- coding: utf-8 -*-
22# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
33# 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.
66 Change directory to provide relative paths for doctests
77 >>> import os
88 >>> filepath = os.path.dirname(os.path.realpath(__file__))
2323
2424class ICA_AROMAInputSpec (CommandLineInputSpec ):
2525 feat_dir = Directory (exists = True , mandatory = True ,
26- argstr = '-feat %s' ,
26+ argstr = '-feat %s' ,
2727 xor = ['in_file' , 'mat_file' , 'fnirt_warp_file' , 'motion_parameters' ],
2828 desc = 'If a feat directory exists and temporal filtering '
2929 'has not been run yet, ICA_AROMA can use the files in '
3030 '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' ],
3333 desc = 'volume to be denoised' )
3434 out_dir = Directory ('out' , mandatory = True ,
35- argstr = '-o %s' ,
35+ argstr = '-o %s' ,
3636 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' ],
3838 desc = 'path/name volume mask' )
3939 dim = traits .Int (argstr = '-dim %d' ,
4040 desc = 'Dimensionality reduction when running '
@@ -65,31 +65,31 @@ class ICA_AROMAInputSpec(CommandLineInputSpec):
6565 '-both: both aggressive and non-aggressive denoising (two outputs)' )
6666
6767class ICA_AROMAOutputSpec (TraitedSpec ):
68- aggr_denoised_file = File (exists = True ,
68+ aggr_denoised_file = File (exists = True ,
6969 desc = 'if generated: aggressively denoised volume' )
7070 nonaggr_denoised_file = File (exists = True ,
7171 desc = 'if generated: non aggressively denoised volume' )
72- out_dir = Directory (exists = True ,
72+ out_dir = Directory (exists = True ,
7373 desc = 'directory contains (in addition to the denoised files): '
7474 'melodic.ica + classified_motion_components + '
7575 'classification_overview + feature_scores + melodic_ic_mni)' )
76-
76+
7777class ICA_AROMA (CommandLine ):
7878 """
7979 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
8282 a data-driven method to identify and remove motion-related independent
8383 components from fMRI data. To that end it exploits a small, but robust
8484 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.
8686
8787 See link for further documentation: https://github.com/rhr-pruim/ICA-AROMA
8888
8989 Example
9090 -------
9191
92- >>> from nipype.interfaces.fsl import ICA_AROMA
92+ >>> from nipype.interfaces.fsl import ICA_AROMA
9393 >>> from nipype.testing import example_data
9494 >>> AROMA_obj = ICA_AROMA.ICA_AROMA()
9595 >>> AROMA_obj.inputs.in_file = 'functional.nii'
@@ -114,5 +114,5 @@ def _list_outputs(self):
114114 outputs ['aggr_denoised_file' ] = os .path .join (out_dir , 'denoised_func_data_aggr.nii.gz' )
115115 if self .inputs .denoise_type in ('nonaggr' , 'both' ):
116116 outputs ['nonaggr_denoised_file' ] = os .path .join (out_dir , 'denoised_func_data_nonaggr.nii.gz' )
117-
117+
118118 return outputs
0 commit comments