Skip to content

Commit 29b25f9

Browse files
committed
Merge remote-tracking branch 'upstream/master' into enh/vagrant
* upstream/master: changelog cleanup added test file for TCorr1D added missing import added new interface info to the changelog added example to docstring, removed leftover genfile fixed workflow name Made revisions to the new 3dTCorr1D interface. Introduced a wrapper for 3dTcorr1D.
2 parents f84e7f1 + 714b4aa commit 29b25f9

File tree

5 files changed

+152
-22
lines changed

5 files changed

+152
-22
lines changed

CHANGES

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@ Next release
22
============
33

44
* ENH: SelectFiles: a streamlined version of DataGrabber
5-
* ENH: New interfaces: spm.ResliceToReference, FuzzyOverlap, afni.AFNItoNIFTI
6-
spm.DicomImport, P2PDistance
5+
* ENH: new tools for defining workflows: JoinNode, synchronize and itersource
76
* ENH: W3C PROV support with optional RDF export built into Nipype
87
* ENH: Added support for Simple Linux Utility Resource Management (SLURM)
98
* ENH: AFNI interfaces refactor, prefix, suffix are replaced by "flexible_%s_templates"
10-
* ENH: DataGrabber and SelectFiles use human (or natural) sort now
9+
* ENH: New SPM interfaces:
10+
- spm.ResliceToReference,
11+
- spm.DicomImport
12+
* ENH: New AFNI interfaces:
13+
- afni.AFNItoNIFTI
14+
- afni.TCorr1D
1115
* ENH: Several new interfaces related to Camino were added:
1216
- camino.SFPICOCalibData
1317
- camino.Conmat
@@ -20,6 +24,25 @@ Next release
2024
- mrtrix.GenerateDirections
2125
- mrtrix.FindShPeaks
2226
- mrtrix.Directions2Amplitude
27+
* ENH: New FSL interfaces:
28+
- fsl.PrepareFieldmap
29+
- fsl.TOPUP
30+
- fsl.ApplyTOPUP
31+
- fsl.Eddy
32+
* ENH: New misc interfaces:
33+
- FuzzyOverlap,
34+
- P2PDistance
35+
* ENH: New workflows: nipype.workflows.dmri.fsl.epi.[fieldmap_correction&topup_correction]
36+
* ENH: Added simplified outputname generation for command line interfaces.
37+
* ENH: Allow ants use a single mask image
38+
* ENH: Create configuration option for parameterizing directories with hashes
39+
* ENH: arrange nodes by topological sort with disconnected subgraphs
40+
* ENH: uses the nidm iri namespace for uuids
41+
* ENH: remove old reporting webpage
42+
43+
* API: 'name' is now a positional argument for Workflow, Node, and MapNode constructors
44+
* API: SPM now defaults to SPM8 or SPM12b job format
45+
* API: DataGrabber and SelectFiles use human (or natural) sort now
2346

2447
* FIX: Several fixes related to Camino interfaces:
2548
- ProcStreamlines would ignore many arguments silently (target, waypoint, exclusion ROIS, etc.)
@@ -29,29 +52,12 @@ Next release
2952
- Track input model names were outdated (and would generate an error)
3053
- Track numpds parameter could not be set for deterministic tractography
3154
- FA created output files with erroneous extension
32-
3355
* FIX: Deals properly with 3d files in SPM Realign
3456
* FIX: SPM with MCR fixed
35-
36-
* API: 'name' is now a positional argument for Workflow, Node, and MapNode constructors
37-
* API: SPM now defaults to SPM8 or SPM12b job format
38-
39-
* ENH: New FSL interfaces: fsl.PrepareFieldmap, fsl.TOPUP, fsl.ApplyTOPUP, fsl.Eddy
40-
* ENH: New workflows: nipype.workflows.dmri.fsl.epi.[fieldmap_correction&topup_correction]
41-
42-
* ENH: Added simplified outputname generation for command line interfaces.
4357
* FIX: Cleaned up input and output spec metadata
44-
45-
* ENH: Allow ants use a single mask image
46-
* ENH: Create configuration option for parameterizing directories with hashes
47-
* ENH: arrange nodes by topological sort with disconnected subgraphs
48-
* ENH: uses the nidm iri namespace for uuids
49-
* ENH: remove old reporting webpage (this is a WIP i hope to finish in a day or two)
50-
5158
* FIX: example openfmri script now makes the contrast spec a hashed input
5259
* FIX: FILMGLS compatibility with FSL 5.0.5
5360
* FIX: Freesurfer recon-all resume now avoids setting inputs
54-
5561
* FIX: File removal from node respects file associations img/hdr/mat, BRIK/HEAD
5662

5763
Release 0.8.0 (May 8, 2013)

nipype/interfaces/afni/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@
1111
ZCutUp, Calc, TShift, Warp, Detrend, Despike, Copy,
1212
Fourier, Allineate, Maskave, SkullStrip, TCat, Fim,
1313
BlurInMask, Autobox, TCorrMap, Bandpass, Retroicor,
14-
TCorrelate, BrickStat, ROIStats, AutoTcorrelate,
14+
TCorrelate, TCorr1D, BrickStat, ROIStats, AutoTcorrelate,
1515
AFNItoNIFTI)

nipype/interfaces/afni/preprocess.py

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1308,6 +1308,70 @@ class TCorrelate(AFNICommand):
13081308
output_spec = AFNICommandOutputSpec
13091309

13101310

1311+
class TCorr1DInputSpec(AFNICommandInputSpec):
1312+
xset = File(desc = '3d+time dataset input',
1313+
argstr = ' %s',
1314+
position = -2,
1315+
mandatory = True,
1316+
exists = True)
1317+
y_1d = File(desc = '1D time series file input',
1318+
argstr = ' %s',
1319+
position = -1,
1320+
mandatory = True,
1321+
exists = True)
1322+
out_file = File(desc = 'output filename prefix',
1323+
name_template='%s_correlation.nii.gz',
1324+
argstr = '-prefix %s',
1325+
name_source = 'xset',
1326+
keep_extension = True)
1327+
pearson = traits.Bool(desc='Correlation is the normal' +
1328+
' Pearson correlation coefficient',
1329+
argstr=' -pearson',
1330+
xor=['spearman','quadrant','ktaub'],
1331+
position=1)
1332+
spearman = traits.Bool(desc='Correlation is the' +
1333+
' Spearman (rank) correlation coefficient',
1334+
argstr=' -spearman',
1335+
xor=['pearson','quadrant','ktaub'],
1336+
position=1)
1337+
quadrant = traits.Bool(desc='Correlation is the' +
1338+
' quadrant correlation coefficient',
1339+
argstr=' -quadrant',
1340+
xor=['pearson','spearman','ktaub'],
1341+
position=1)
1342+
ktaub = traits.Bool(desc='Correlation is the' +
1343+
' Kendall\'s tau_b correlation coefficient',
1344+
argstr=' -ktaub',
1345+
xor=['pearson','spearman','quadrant'],
1346+
position=1)
1347+
1348+
1349+
1350+
class TCorr1DOutputSpec(TraitedSpec):
1351+
out_file = File(desc = 'output file containing correlations',
1352+
exists = True)
1353+
1354+
1355+
class TCorr1D(AFNICommand):
1356+
"""Computes the correlation coefficient between each voxel time series
1357+
in the input 3D+time dataset.
1358+
For complete details, see the `3dTcorr1D Documentation.
1359+
<http://afni.nimh.nih.gov/pub/dist/doc/program_help/3dTcorr1D.html>`_
1360+
1361+
>>> from nipype.interfaces import afni as afni
1362+
>>> tcorr1D = afni.TCorr1D()
1363+
>>> tcorr1D.inputs.xset= 'u_rc1s1_Template.nii'
1364+
>>> tcorr1D.inputs.y_1d = 'seed.1D'
1365+
>>> tcorr1D.cmdline
1366+
'3dTcorr1D -prefix u_rc1s1_Template_correlation.nii.gz u_rc1s1_Template.nii seed.1D'
1367+
>>> res = tcorr1D.run() # doctest: +SKIP
1368+
"""
1369+
1370+
_cmd = '3dTcorr1D'
1371+
input_spec = TCorr1DInputSpec
1372+
output_spec = TCorr1DOutputSpec
1373+
1374+
13111375
class BrickStatInputSpec(AFNICommandInputSpec):
13121376
in_file = File(desc='input file to 3dmaskave',
13131377
argstr='%s',
@@ -1861,3 +1925,4 @@ def _overload_extension(self, value):
18611925
def _gen_filename(self, name):
18621926
return os.path.abspath(super(AFNItoNIFTI, self)._gen_filename(name))
18631927

1928+
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
2+
from nipype.testing import assert_equal
3+
from nipype.interfaces.afni.preprocess import TCorr1D
4+
def test_TCorr1D_inputs():
5+
input_map = dict(ignore_exception=dict(nohash=True,
6+
usedefault=True,
7+
),
8+
spearman=dict(position=1,
9+
xor=['pearson', 'quadrant', 'ktaub'],
10+
argstr=' -spearman',
11+
),
12+
pearson=dict(position=1,
13+
xor=['spearman', 'quadrant', 'ktaub'],
14+
argstr=' -pearson',
15+
),
16+
out_file=dict(name_source='xset',
17+
argstr='-prefix %s',
18+
name_template='%s_correlation.nii.gz',
19+
keep_extension=True,
20+
),
21+
y_1d=dict(position=-1,
22+
mandatory=True,
23+
argstr=' %s',
24+
),
25+
ktaub=dict(position=1,
26+
xor=['pearson', 'spearman', 'quadrant'],
27+
argstr=' -ktaub',
28+
),
29+
args=dict(argstr='%s',
30+
),
31+
xset=dict(position=-2,
32+
mandatory=True,
33+
argstr=' %s',
34+
),
35+
outputtype=dict(),
36+
quadrant=dict(position=1,
37+
xor=['pearson', 'spearman', 'ktaub'],
38+
argstr=' -quadrant',
39+
),
40+
terminal_output=dict(mandatory=True,
41+
nohash=True,
42+
),
43+
environ=dict(nohash=True,
44+
usedefault=True,
45+
),
46+
)
47+
inputs = TCorr1D.input_spec()
48+
49+
for key, metadata in input_map.items():
50+
for metakey, value in metadata.items():
51+
yield assert_equal, getattr(inputs.traits()[key], metakey), value
52+
def test_TCorr1D_outputs():
53+
output_map = dict(out_file=dict(),
54+
)
55+
outputs = TCorr1D.output_spec()
56+
57+
for key, metadata in output_map.items():
58+
for metakey, value in metadata.items():
59+
yield assert_equal, getattr(outputs.traits()[key], metakey), value

tools/run_examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def run_examples(example, pipelines, plugin):
2222
if __name__ == '__main__':
2323
path, file = os.path.split(__file__)
2424
sys.path.insert(0, os.path.realpath(os.path.join(path, '..', 'examples')))
25-
examples = {'fmri_fsl_reuse':['l1pipeline'],
25+
examples = {'fmri_fsl_reuse':['level1_workflow'],
2626
'fmri_spm_nested':['level1','l2pipeline'],
2727
'fmri_spm_dartel':['level1','l2pipeline'],
2828
'fmri_fsl_feeds':['l1pipeline']}

0 commit comments

Comments
 (0)