Skip to content

Commit 4a3b053

Browse files
committed
fix: updating fsl metadata
1 parent 1ac1285 commit 4a3b053

File tree

4 files changed

+90
-78
lines changed

4 files changed

+90
-78
lines changed

nipype/interfaces/fsl/dti.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -171,30 +171,30 @@ class BEDPOSTXInputSpec(FSLCommandInputSpec):
171171

172172

173173
class BEDPOSTXOutputSpec(TraitedSpec):
174-
bpx_out_directory = Directory(exists=True, field='dir',
174+
bpx_out_directory = Directory(exists=True,
175175
desc='path/name of directory with all ' +
176176
'bedpostx output files for this subject')
177-
xfms_directory = Directory(exists=True, field='dir',
177+
xfms_directory = Directory(exists=True,
178178
desc='path/name of directory with the ' +
179179
'tranformation matrices')
180-
merged_thsamples = traits.List(File, exists=True,
180+
merged_thsamples = traits.List(File(exists=True),
181181
desc='a list of path/name of 4D volume ' +
182182
'with samples from the distribution ' +
183183
'on theta')
184-
merged_phsamples = traits.List(File, exists=True,
184+
merged_phsamples = traits.List(File(exists=True),
185185
desc='a list of path/name of file with '
186186
'samples from the distribution on phi')
187-
merged_fsamples = traits.List(File, exists=True,
187+
merged_fsamples = traits.List(File(exists=True),
188188
desc='a list of path/name of 4D volume ' +
189189
'with samples from the distribution ' +
190190
'on anisotropic volume fraction')
191-
mean_thsamples = traits.List(File, exists=True,
191+
mean_thsamples = traits.List(File(exists=True),
192192
desc='a list of path/name of 3D volume with mean of distribution on theta')
193-
mean_phsamples = traits.List(File, exists=True,
193+
mean_phsamples = traits.List(File(exists=True),
194194
desc='a list of path/name of 3D volume with mean of distribution on phi')
195-
mean_fsamples = traits.List(File, exists=True,
195+
mean_fsamples = traits.List(File(exists=True),
196196
desc='a list of path/name of 3D volume with mean of distribution on f anisotropy')
197-
dyads = traits.List(File, exists=True, desc='a list of path/name of mean of PDD distribution in vector form')
197+
dyads = traits.List(File(exists=True), desc='a list of path/name of mean of PDD distribution in vector form')
198198

199199

200200
class BEDPOSTX(FSLCommand):
@@ -368,8 +368,8 @@ class ProbTrackXOutputSpec(TraitedSpec):
368368
way_total = File(exists=True, desc='path/name of a text file containing a single number ' +
369369
'corresponding to the total number of generated tracts that ' +
370370
'have not been rejected by inclusion/exclusion mask criteria')
371-
targets = traits.List(File, exists=True, desc='a list with all generated seeds_to_target files')
372-
particle_files = traits.List(File, exists=True, desc='Files describing ' +
371+
targets = traits.List(File(exists=True), desc='a list with all generated seeds_to_target files')
372+
particle_files = traits.List(File(exists=True), desc='Files describing ' +
373373
'all of the tract samples. Generated only if ' +
374374
'verbose is set to 2')
375375

@@ -566,7 +566,7 @@ def _gen_filename(self, name):
566566

567567

568568
class ProjThreshInputSpec(FSLCommandInputSpec):
569-
in_files = traits.List(File, exists=True, argstr='%s',
569+
in_files = traits.List(File(exists=True), argstr='%s',
570570
desc='a list of input volumes',
571571
mandatory=True, position=0)
572572
threshold = traits.Int(argstr='%d', desc='threshold indicating minimum ' +
@@ -575,7 +575,7 @@ class ProjThreshInputSpec(FSLCommandInputSpec):
575575

576576

577577
class ProjThreshOuputSpec(TraitedSpec):
578-
out_files = traits.List(File, exists=True, desc='path/name of output volume after thresholding')
578+
out_files = traits.List(File(exists=True), desc='path/name of output volume after thresholding')
579579

580580

581581
class ProjThresh(FSLCommand):
@@ -610,9 +610,11 @@ def _list_outputs(self):
610610

611611

612612
class FindTheBiggestInputSpec(FSLCommandInputSpec):
613-
in_files = traits.List(File, exists=True, argstr='%s', desc='a list of input volumes or a singleMatrixFile',
613+
in_files = traits.List(File(exists=True), argstr='%s',
614+
desc='a list of input volumes or a singleMatrixFile',
614615
position=0, mandatory=True)
615-
out_file = File(argstr='%s', desc='file with the resulting segmentation', position=2, genfile=True, hash_files=False)
616+
out_file = File(argstr='%s', desc='file with the resulting segmentation',
617+
position=2, genfile=True, hash_files=False)
616618

617619

618620
class FindTheBiggestOutputSpec(TraitedSpec):

nipype/interfaces/fsl/model.py

Lines changed: 70 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ def _list_outputs(self):
366366

367367

368368
class FEATInputSpec(FSLCommandInputSpec):
369-
fsf_file = File(exist=True, mandatory=True, argstr="%s", position=0,
369+
fsf_file = File(exists=True, mandatory=True, argstr="%s", position=0,
370370
desc="File specifying the feat design spec file")
371371

372372

@@ -408,7 +408,7 @@ def _list_outputs(self):
408408

409409

410410
class FEATModelInputSpec(FSLCommandInputSpec):
411-
fsf_file = File(exist=True, mandatory=True, argstr="%s", position=0,
411+
fsf_file = File(exists=True, mandatory=True, argstr="%s", position=0,
412412
desc="File specifying the feat design spec file",
413413
copyfile=False)
414414
ev_files = traits.List(File(exists=True),
@@ -483,14 +483,14 @@ class FILMGLSInputSpec(FSLCommandInputSpec):
483483
design_file = File(exists=True, position=-2,
484484
argstr='%s',
485485
desc='design matrix file')
486-
threshold = traits.Float(1000, min=0, argstr='%f',
487-
position=-1,
486+
threshold = traits.Range(default=1000., low=0.0, argstr='%f',
487+
position=-1, usedefault=True,
488488
desc='threshold')
489489
smooth_autocorr = traits.Bool(argstr='-sa',
490490
desc='Smooth auto corr estimates')
491491
mask_size = traits.Int(argstr='-ms %d',
492492
desc="susan mask size")
493-
brightness_threshold = traits.Int(min=0, argstr='-epith %d',
493+
brightness_threshold = traits.Range(low=0, argstr='-epith %d',
494494
desc='susan brightness threshold, otherwise it is estimated')
495495
full_data = traits.Bool(argstr='-v', desc='output full data')
496496
_estimate_xor = ['autocorr_estimate_only', 'fit_armodel', 'tukey_window',
@@ -601,10 +601,10 @@ def _list_outputs(self):
601601

602602
class FEATRegisterInputSpec(BaseInterfaceInputSpec):
603603
feat_dirs = InputMultiPath(
604-
Directory(), exist=True, desc="Lower level feat dirs",
604+
Directory(exists=True), desc="Lower level feat dirs",
605605
mandatory=True)
606606
reg_image = File(
607-
exist=True, desc="image to register to (will be treated as standard)",
607+
exists=True, desc="image to register to (will be treated as standard)",
608608
mandatory=True)
609609
reg_dof = traits.Int(
610610
12, desc="registration degrees of freedom", usedefault=True)
@@ -689,31 +689,34 @@ class FLAMEOInputSpec(FSLCommandInputSpec):
689689

690690

691691
class FLAMEOOutputSpec(TraitedSpec):
692-
pes = OutputMultiPath(exists=True, desc="Parameter estimates for each column of the design matrix" +
693-
"for each voxel")
694-
res4d = OutputMultiPath(
695-
exists=True, desc="Model fit residual mean-squared error for each time point")
696-
copes = OutputMultiPath(
697-
exists=True, desc="Contrast estimates for each contrast")
698-
var_copes = OutputMultiPath(
699-
exists=True, desc="Variance estimates for each contrast")
700-
zstats = OutputMultiPath(exists=True, desc="z-stat file for each contrast")
701-
tstats = OutputMultiPath(exists=True, desc="t-stat file for each contrast")
702-
zfstats = OutputMultiPath(
703-
exists=True, desc="z stat file for each f contrast")
704-
fstats = OutputMultiPath(exists=True, desc="f-stat file for each contrast")
705-
mrefvars = OutputMultiPath(
706-
exists=True, desc="mean random effect variances for each contrast")
707-
tdof = OutputMultiPath(
708-
exists=True, desc="temporal dof file for each contrast")
709-
weights = OutputMultiPath(
710-
exists=True, desc="weights file for each contrast")
711-
stats_dir = Directory(
712-
exists=True, desc="directory storing model estimation output")
713-
714-
715-
# interface to fsl command line higher level model fit
716-
# satra: 2010-01-09
692+
pes = OutputMultiPath(File(exists=True),
693+
desc=("Parameter estimates for each column of the "
694+
"design matrix for each voxel"))
695+
res4d = OutputMultiPath(File(exists=True),
696+
desc=("Model fit residual mean-squared error for "
697+
"each time point"))
698+
copes = OutputMultiPath(File(exists=True),
699+
desc="Contrast estimates for each contrast")
700+
var_copes = OutputMultiPath(File(exists=True),
701+
desc="Variance estimates for each contrast")
702+
zstats = OutputMultiPath(File(exists=True),
703+
desc="z-stat file for each contrast")
704+
tstats = OutputMultiPath(File(exists=True),
705+
desc="t-stat file for each contrast")
706+
zfstats = OutputMultiPath(File(exists=True),
707+
desc="z stat file for each f contrast")
708+
fstats = OutputMultiPath(File(exists=True),
709+
desc="f-stat file for each contrast")
710+
mrefvars = OutputMultiPath(File(exists=True),
711+
desc=("mean random effect variances for each "
712+
"contrast"))
713+
tdof = OutputMultiPath(File(exists=True),
714+
desc="temporal dof file for each contrast")
715+
weights = OutputMultiPath(File(exists=True),
716+
desc="weights file for each contrast")
717+
stats_dir = Directory(File(exists=True),
718+
desc="directory storing model estimation output")
719+
717720

718721
class FLAMEO(FSLCommand):
719722
"""Use FSL flameo command to perform higher level model fits
@@ -832,7 +835,7 @@ class ContrastMgrInputSpec(FSLCommandInputSpec):
832835
sigmasquareds = File(exists=True, argstr='', position=-2,
833836
copyfile=False, mandatory=True,
834837
desc='summary of residuals, See Woolrich, et. al., 2001')
835-
contrast_num = traits.Int(min=1, argstr='-cope',
838+
contrast_num = traits.Range(low=1, argstr='-cope',
836839
desc='contrast number to start labeling copes from')
837840
suffix = traits.Str(argstr='-suffix %s',
838841
desc='suffix to put on the end of the cope filename before the contrast number, default is nothing')
@@ -952,8 +955,8 @@ def _list_outputs(self):
952955

953956

954957
class L2ModelInputSpec(BaseInterfaceInputSpec):
955-
num_copes = traits.Int(min=1, mandatory=True,
956-
desc='number of copes to be combined')
958+
num_copes = traits.Range(low=1, mandatory=True,
959+
desc='number of copes to be combined')
957960

958961

959962
class L2ModelOutputSpec(TraitedSpec):
@@ -1191,7 +1194,7 @@ class SMMInputSpec(FSLCommandInputSpec):
11911194
spatial_data_file = File(
11921195
exists=True, position=0, argstr='--sdf="%s"', mandatory=True,
11931196
desc="statistics spatial map", copyfile=False)
1194-
mask = File(exist=True, position=1, argstr='--mask="%s"', mandatory=True,
1197+
mask = File(exists=True, position=1, argstr='--mask="%s"', mandatory=True,
11951198
desc="mask file", copyfile=False)
11961199
no_deactivation_class = traits.Bool(position=2, argstr="--zfstatmode",
11971200
desc="enforces no deactivation class")
@@ -1716,30 +1719,37 @@ class GLMInputSpec(FSLCommandInputSpec):
17161719

17171720
class GLMOutputSpec(TraitedSpec):
17181721
out_file = File(exists=True, desc=('file name of GLM parameters'
1719-
+ ' (if generated)'))
1720-
out_cope = OutputMultiPath(exists=True, desc='output file name for COPEs' +
1721-
' (either as text file or image)')
1722-
out_z = OutputMultiPath(exists=True, desc='output file name for COPEs' +
1723-
' (either as text file or image)')
1724-
out_t = OutputMultiPath(exists=True, desc='output file name for t-stats' +
1725-
' (either as text file or image)')
1726-
out_p = OutputMultiPath(exists=True, desc='output file name for p-values' +
1727-
' of Z-stats (either as text file or image)')
1728-
out_f = OutputMultiPath(exists=True, desc='output file name for F-value' +
1729-
' of full model fit')
1730-
out_pf = OutputMultiPath(exists=True, desc='output file name for p-value' +
1731-
' for full model fit')
1732-
out_res = OutputMultiPath(exists=True, desc='output file name for' +
1733-
' residuals')
1734-
out_varcb = OutputMultiPath(exists=True, desc='output file name for' +
1735-
' variance of COPEs')
1736-
out_sigsq = OutputMultiPath(exists=True, desc='output file name for' +
1737-
' residual noise variance sigma-square')
1738-
out_data = OutputMultiPath(exists=True, desc='output file name for' +
1739-
' residual noise variance sigma-square')
1740-
out_vnscales = OutputMultiPath(exists=True, desc='output file name' +
1741-
' for scaling factors for variance' +
1742-
' normalisation')
1722+
' (if generated)'))
1723+
out_cope = OutputMultiPath(File(exists=True),
1724+
desc=('output file name for COPEs (either as '
1725+
'text file or image)'))
1726+
out_z = OutputMultiPath(File(exists=True),
1727+
desc=('output file name for COPEs (either as text '
1728+
'file or image)'))
1729+
out_t = OutputMultiPath(File(exists=True),
1730+
desc=('output file name for t-stats (either as '
1731+
'text file or image)'))
1732+
out_p = OutputMultiPath(File(exists=True),
1733+
desc=('output file name for p-values of Z-stats '
1734+
'(either as text file or image)'))
1735+
out_f = OutputMultiPath(File(exists=True),
1736+
desc=('output file name for F-value of full model '
1737+
'fit'))
1738+
out_pf = OutputMultiPath(File(exists=True),
1739+
desc=('output file name for p-value for full '
1740+
'model fit'))
1741+
out_res = OutputMultiPath(File(exists=True),
1742+
desc='output file name for residuals')
1743+
out_varcb = OutputMultiPath(File(exists=True),
1744+
desc='output file name for variance of COPEs')
1745+
out_sigsq = OutputMultiPath(File(exists=True),
1746+
desc=('output file name for residual noise '
1747+
'variance sigma-square'))
1748+
out_data = OutputMultiPath(File(exists=True),
1749+
desc='output file for preprocessed data')
1750+
out_vnscales = OutputMultiPath(File(exists=True),
1751+
desc=('output file name for scaling factors '
1752+
'for variance normalisation'))
17431753

17441754

17451755
class GLM(FSLCommand):

nipype/interfaces/fsl/preprocess.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ class FASTInputSpec(FSLCommandInputSpec):
251251
mixel_smooth = traits.Range(low=0.0, high=1.0,
252252
desc='spatial smoothness for mixeltype',
253253
argstr='-R %.2f')
254-
iters_afterbias = traits.Range(low=1, hight=20,
254+
iters_afterbias = traits.Range(low=1, high=20,
255255
desc='number of main-loop iterations '
256256
'after bias-field removal',
257257
argstr='-O %d')

nipype/interfaces/fsl/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ class ExtractROIInputSpec(FSLCommandInputSpec):
181181
'y_size', 'z_min', 'z_size', 't_min', 't_size']
182182
crop_list = traits.List(traits.Tuple(traits.Int, traits.Int),
183183
argstr="%s", position=2, xor=_crop_xor,
184-
help="list of two tuples specifying crop options")
184+
desc="list of two tuples specifying crop options")
185185

186186

187187
class ExtractROIOutputSpec(TraitedSpec):
@@ -1324,7 +1324,7 @@ class InvWarpInputSpec(FSLCommandInputSpec):
13241324
inverse_warp = File(exists=True,
13251325
desc='Name of output file, containing warps that are the "reverse" of those in --warp. This will be a field-file (rather than a file of spline coefficients), and it will have any affine component included as part of the displacements.',
13261326
argstr='--out=%s',
1327-
gen_file=True)
1327+
genfile=True)
13281328

13291329
absolute = traits.Bool(argstr='--abs',
13301330
desc='If set it indicates that the warps in --warp should be interpreted as absolute, provided that it is not created by fnirt (which always uses relative warps). If set it also indicates that the output --out should be absolute.',

0 commit comments

Comments
 (0)