Skip to content

Commit 145224f

Browse files
committed
Made revisions to the new 3dTCorr1D interface.
1 parent 766b30a commit 145224f

File tree

1 file changed

+37
-14
lines changed

1 file changed

+37
-14
lines changed

nipype/interfaces/afni/preprocess.py

Lines changed: 37 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,35 +1310,56 @@ class TCorrelate(AFNICommand):
13101310

13111311

13121312
class TCorr1DInputSpec(AFNICommandInputSpec):
1313-
xset = File(desc = 'xset to 3dTcorr1D',
1313+
xset = File(desc = '3d+time dataset input',
13141314
argstr = ' %s',
13151315
position = -2,
13161316
mandatory = True,
13171317
exists = True)
1318-
y_1d = File(desc = 'y1D from 3dTcorr1D',
1318+
y_1d = File(desc = '1D time series file input',
13191319
argstr = ' %s',
13201320
position = -1,
13211321
mandatory = True,
13221322
exists = True)
1323-
out_file = File(desc = 'output file from 3dTcorr1D',
1323+
out_file = File(desc = 'output filename prefix',
1324+
name_template='%s_correlation.nii.gz',
13241325
argstr = '-prefix %s',
1325-
genfile = True)
1326-
options = traits.Str(desc = 'select options',
1327-
argstr = ' %s')
1328-
suffix = traits.Str(desc="out_file suffix")
1329-
1330-
1331-
class TCorr1DOutputSpec(AFNICommandOutputSpec):
1326+
name_source = 'xset',
1327+
genfile = True,
1328+
keep_extension = True)
1329+
pearson = traits.Bool(desc='Correlation is the normal' +
1330+
' Pearson correlation coefficient',
1331+
argstr=' -pearson',
1332+
xor=['spearman','quadrant','ktaub'],
1333+
position=1)
1334+
spearman = traits.Bool(desc='Correlation is the' +
1335+
' Spearman (rank) correlation coefficient',
1336+
argstr=' -spearman',
1337+
xor=['pearson','quadrant','ktaub'],
1338+
position=1)
1339+
quadrant = traits.Bool(desc='Correlation is the' +
1340+
' quadrant correlation coefficient',
1341+
argstr=' -quadrant',
1342+
xor=['pearson','spearman','ktaub'],
1343+
position=1)
1344+
ktaub = traits.Bool(desc='Correlation is the' +
1345+
' Kendall\'s tau_b correlation coefficient',
1346+
argstr=' -ktaub',
1347+
xor=['pearson','spearman','quadrant'],
1348+
position=1)
1349+
1350+
1351+
1352+
class TCorr1DOutputSpec(TraitedSpec):
13321353
out_file = File(desc = 'output file containing correlations',
13331354
exists = True)
13341355

13351356

13361357
class TCorr1D(AFNICommand):
13371358
"""Computes the correlation coefficient between each voxel time series
1338-
in the input 3D+time dataset.
1339-
For complete details, see the `3dTcorr1D Documentation.
1340-
<http://afni.nimh.nih.gov/pub/dist/doc/program_help/3dTcorr1D.html>`_
1341-
"""
1359+
in the input 3D+time dataset.
1360+
For complete details, see the `3dTcorr1D Documentation.
1361+
<http://afni.nimh.nih.gov/pub/dist/doc/program_help/3dTcorr1D.html>`_
1362+
"""
13421363

13431364
_cmd = '3dTcorr1D'
13441365
input_spec = TCorr1DInputSpec
@@ -1897,3 +1918,5 @@ def _overload_extension(self, value):
18971918

18981919
def _gen_filename(self, name):
18991920
return os.path.abspath(super(AFNItoNIFTI, self)._gen_filename(name))
1921+
1922+

0 commit comments

Comments
 (0)