Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
check fixes
  • Loading branch information
satra committed May 11, 2017
commit 140fb0859d79f08cc7d5d1f54881d329d79568ba
14 changes: 7 additions & 7 deletions nipype/algorithms/confounds.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,14 +308,14 @@ class CompCorInputSpec(BaseInterfaceInputSpec):
mask_files = InputMultiPath(File(exists=True),
desc=('One or more mask files that determines '
'ROI (3D). When more that one file is '
'provided `merge_method` or '
'provided `merge_method` or '
'`merge_index` must be provided'))
merge_method = traits.Enum('union', 'intersect', 'none', xor=['mask_index'],
requires=['mask_files'],
desc=('Merge method if multiple masks are '
'present - `union` uses voxels included in'
'present - `union` uses voxels included in'
' at least one input mask, `intersect` '
'uses only voxels present in all input '
'uses only voxels present in all input '
'masks, `none` performs CompCor on '
'each mask individually'))
mask_index = traits.Range(low=0, xor=['merge_method'],
Expand All @@ -330,8 +330,8 @@ class CompCorInputSpec(BaseInterfaceInputSpec):
'pre-component extraction'))
regress_poly_degree = traits.Range(low=1, default=1, usedefault=True,
desc='the degree polynomial to use')
header_prefix = traits.Str(desc=('the desired header for the output tsv '
'file (one column). If undefined, will '
header_prefix = traits.Str(desc=('the desired header for the output tsv '
'file (one column). If undefined, will '
'default to "CompCor"'))


Expand Down Expand Up @@ -851,8 +851,8 @@ def combine_mask_files(mask_files, mask_method=None, mask_index=None):
if len(mask_files) == 1:
mask_index = 0
else:
raise ValueError(('When more than one mask file is provided, '
'one of merge_method or mask_index must be '
raise ValueError(('When more than one mask file is provided, '
'one of merge_method or mask_index must be '
'set'))
if mask_index < len(mask_files):
mask = nb.load(mask_files[mask_index], mmap=NUMPY_MMAP)
Expand Down
30 changes: 15 additions & 15 deletions nipype/interfaces/fsl/ICA_AROMA.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""This commandline module provides classes for interfacing with the
`ICA-AROMA.py<https://github.com/rhr-pruim/ICA-AROMA>`_ command line tool.
"""This commandline module provides classes for interfacing with the
`ICA-AROMA.py<https://github.com/rhr-pruim/ICA-AROMA>`_ command line tool.
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirname(os.path.realpath(__file__))
Expand All @@ -23,18 +23,18 @@

class ICA_AROMAInputSpec(CommandLineInputSpec):
feat_dir = Directory(exists=True, mandatory=True,
argstr='-feat %s',
argstr='-feat %s',
xor=['in_file', 'mat_file', 'fnirt_warp_file', 'motion_parameters'],
desc='If a feat directory exists and temporal filtering '
'has not been run yet, ICA_AROMA can use the files in '
'this directory.')
in_file = File(exists=True, mandatory=True,
argstr='-i %s', xor=['feat_dir'],
in_file = File(exists=True, mandatory=True,
argstr='-i %s', xor=['feat_dir'],
desc='volume to be denoised')
out_dir = Directory('out', mandatory=True,
argstr='-o %s',
argstr='-o %s',
desc='output directory')
mask = File(exists=True, argstr='-m %s', xor=['feat_dir'],
mask = File(exists=True, argstr='-m %s', xor=['feat_dir'],
desc='path/name volume mask')
dim = traits.Int(argstr='-dim %d',
desc='Dimensionality reduction when running '
Expand Down Expand Up @@ -65,31 +65,31 @@ class ICA_AROMAInputSpec(CommandLineInputSpec):
'-both: both aggressive and non-aggressive denoising (two outputs)')

class ICA_AROMAOutputSpec(TraitedSpec):
aggr_denoised_file = File(exists=True,
aggr_denoised_file = File(exists=True,
desc='if generated: aggressively denoised volume')
nonaggr_denoised_file = File(exists=True,
desc='if generated: non aggressively denoised volume' )
out_dir = Directory(exists=True,
out_dir = Directory(exists=True,
desc='directory contains (in addition to the denoised files): '
'melodic.ica + classified_motion_components + '
'classification_overview + feature_scores + melodic_ic_mni)')

class ICA_AROMA(CommandLine):
"""
Interface for the ICA_AROMA.py script.
ICA-AROMA (i.e. 'ICA-based Automatic Removal Of Motion Artifacts') concerns

ICA-AROMA (i.e. 'ICA-based Automatic Removal Of Motion Artifacts') concerns
a data-driven method to identify and remove motion-related independent
components from fMRI data. To that end it exploits a small, but robust
set of theoretically motivated features, preventing the need for classifier
re-training and therefore providing direct and easy applicability.
re-training and therefore providing direct and easy applicability.

See link for further documentation: https://github.com/rhr-pruim/ICA-AROMA

Example
-------

>>> from nipype.interfaces.fsl import ICA_AROMA
>>> from nipype.interfaces.fsl import ICA_AROMA
>>> from nipype.testing import example_data
>>> AROMA_obj = ICA_AROMA.ICA_AROMA()
>>> AROMA_obj.inputs.in_file = 'functional.nii'
Expand All @@ -114,5 +114,5 @@ def _list_outputs(self):
outputs['aggr_denoised_file'] = os.path.join(out_dir, 'denoised_func_data_aggr.nii.gz')
if self.inputs.denoise_type in ('nonaggr', 'both'):
outputs['nonaggr_denoised_file'] = os.path.join(out_dir, 'denoised_func_data_nonaggr.nii.gz')

return outputs
2 changes: 1 addition & 1 deletion nipype/interfaces/niftyreg/tests/test_regutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def test_reg_average():
os.path.join(os.getcwd(), 'avg_out.nii.gz'),
ref_file, trans1_file, one_file, trans2_file, two_file,
trans3_file, three_file))

assert argv.decode('utf-8') == expected_argv

# Test Reg Average: demean3
Expand Down
2 changes: 1 addition & 1 deletion nipype/pipeline/engine/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def dummy_func(value):
return value + 1


@pytest.mark.skipif(sys.version_info < (3,0),
@pytest.mark.skipif(sys.version_info < (3,0),
reason="the famous segfault #1788")
def test_mapnode_crash(tmpdir):
"""Test mapnode crash when stop_on_first_crash is True"""
Expand Down