@@ -679,7 +679,8 @@ class FLAMEOOutputSpec(TraitedSpec):
679
679
exists = True , desc = "Variance estimates for each contrast" )
680
680
zstats = OutputMultiPath (exists = True , desc = "z-stat file for each contrast" )
681
681
tstats = OutputMultiPath (exists = True , desc = "t-stat file for each contrast" )
682
- zfstats = OutputMultiPath (exists = True , desc = "z stat file for each f contrast" )
682
+ zfstats = OutputMultiPath (
683
+ exists = True , desc = "z stat file for each f contrast" )
683
684
fstats = OutputMultiPath (exists = True , desc = "f-stat file for each contrast" )
684
685
mrefvars = OutputMultiPath (
685
686
exists = True , desc = "mean random effect variances for each contrast" )
@@ -747,30 +748,35 @@ def _list_outputs(self):
747
748
assert len (copes ) >= 1 , 'No cope volumes generated by FSL CEstimate'
748
749
outputs ['copes' ] = copes
749
750
750
- var_copes = human_order_sorted (glob (os .path .join (pth , 'varcope[0-9]*.*' )))
751
+ var_copes = human_order_sorted (
752
+ glob (os .path .join (pth , 'varcope[0-9]*.*' )))
751
753
assert len (
752
754
var_copes ) >= 1 , 'No varcope volumes generated by FSL CEstimate'
753
755
outputs ['var_copes' ] = var_copes
754
756
755
757
zstats = human_order_sorted (glob (os .path .join (pth , 'zstat[0-9]*.*' )))
756
758
assert len (zstats ) >= 1 , 'No zstat volumes generated by FSL CEstimate'
757
759
outputs ['zstats' ] = zstats
758
-
759
-
760
+
760
761
if isdefined (self .inputs .f_con_file ):
761
- zfstats = human_order_sorted (glob (os .path .join (pth , 'zfstat[0-9]*.*' )))
762
- assert len (zfstats ) >= 1 , 'No zfstat volumes generated by FSL CEstimate'
763
- outputs ['zfstats' ] = zfstats
764
-
765
- fstats = human_order_sorted (glob (os .path .join (pth , 'fstat[0-9]*.*' )))
766
- assert len (fstats ) >= 1 , 'No fstat volumes generated by FSL CEstimate'
762
+ zfstats = human_order_sorted (
763
+ glob (os .path .join (pth , 'zfstat[0-9]*.*' )))
764
+ assert len (
765
+ zfstats ) >= 1 , 'No zfstat volumes generated by FSL CEstimate'
766
+ outputs ['zfstats' ] = zfstats
767
+
768
+ fstats = human_order_sorted (
769
+ glob (os .path .join (pth , 'fstat[0-9]*.*' )))
770
+ assert len (
771
+ fstats ) >= 1 , 'No fstat volumes generated by FSL CEstimate'
767
772
outputs ['fstats' ] = fstats
768
773
769
774
tstats = human_order_sorted (glob (os .path .join (pth , 'tstat[0-9]*.*' )))
770
775
assert len (tstats ) >= 1 , 'No tstat volumes generated by FSL CEstimate'
771
776
outputs ['tstats' ] = tstats
772
777
773
- mrefs = human_order_sorted (glob (os .path .join (pth , 'mean_random_effects_var[0-9]*.*' )))
778
+ mrefs = human_order_sorted (
779
+ glob (os .path .join (pth , 'mean_random_effects_var[0-9]*.*' )))
774
780
assert len (
775
781
mrefs ) >= 1 , 'No mean random effects volumes generated by FLAMEO'
776
782
outputs ['mrefvars' ] = mrefs
@@ -779,7 +785,8 @@ def _list_outputs(self):
779
785
assert len (tdof ) >= 1 , 'No T dof volumes generated by FLAMEO'
780
786
outputs ['tdof' ] = tdof
781
787
782
- weights = human_order_sorted (glob (os .path .join (pth , 'weights[0-9]*.*' )))
788
+ weights = human_order_sorted (
789
+ glob (os .path .join (pth , 'weights[0-9]*.*' )))
783
790
assert len (weights ) >= 1 , 'No weight volumes generated by FLAMEO'
784
791
outputs ['weights' ] = weights
785
792
@@ -797,7 +804,7 @@ class ContrastMgrInputSpec(FSLCommandInputSpec):
797
804
param_estimates = InputMultiPath (File (exists = True ),
798
805
argstr = '' , copyfile = False ,
799
806
mandatory = True ,
800
- desc = 'Parameter estimates for each column of the design matrix' )
807
+ desc = 'Parameter estimates for each column of the design matrix' )
801
808
corrections = File (exists = True , copyfile = False , mandatory = True ,
802
809
desc = 'statistical corrections used within FILM modelling' )
803
810
dof_file = File (exists = True , argstr = '' , copyfile = False , mandatory = True ,
@@ -806,26 +813,26 @@ class ContrastMgrInputSpec(FSLCommandInputSpec):
806
813
copyfile = False , mandatory = True ,
807
814
desc = 'summary of residuals, See Woolrich, et. al., 2001' )
808
815
contrast_num = traits .Int (min = 1 , argstr = '-cope' ,
809
- desc = 'contrast number to start labeling copes from' )
816
+ desc = 'contrast number to start labeling copes from' )
810
817
suffix = traits .Str (argstr = '-suffix %s' ,
811
818
desc = 'suffix to put on the end of the cope filename before the contrast number, default is nothing' )
812
819
813
820
814
821
class ContrastMgrOutputSpec (TraitedSpec ):
815
822
copes = OutputMultiPath (File (exists = True ),
816
- desc = 'Contrast estimates for each contrast' )
823
+ desc = 'Contrast estimates for each contrast' )
817
824
varcopes = OutputMultiPath (File (exists = True ),
818
- desc = 'Variance estimates for each contrast' )
825
+ desc = 'Variance estimates for each contrast' )
819
826
zstats = OutputMultiPath (File (exists = True ),
820
- desc = 'z-stat file for each contrast' )
827
+ desc = 'z-stat file for each contrast' )
821
828
tstats = OutputMultiPath (File (exists = True ),
822
- desc = 't-stat file for each contrast' )
829
+ desc = 't-stat file for each contrast' )
823
830
fstats = OutputMultiPath (File (exists = True ),
824
- desc = 'f-stat file for each contrast' )
831
+ desc = 'f-stat file for each contrast' )
825
832
zfstats = OutputMultiPath (File (exists = True ),
826
833
desc = 'z-stat file for each F contrast' )
827
834
neffs = OutputMultiPath (File (exists = True ),
828
- desc = 'neff file ?? for each contrast' )
835
+ desc = 'neff file ?? for each contrast' )
829
836
830
837
831
838
class ContrastMgr (FSLCommand ):
@@ -894,16 +901,16 @@ def _list_outputs(self):
894
901
neffs = []
895
902
for i in range (numtcons ):
896
903
copes .append (self ._gen_fname ('cope%d.nii' % (base_contrast + i ),
897
- cwd = pth ))
904
+ cwd = pth ))
898
905
varcopes .append (
899
906
self ._gen_fname ('varcope%d.nii' % (base_contrast + i ),
900
- cwd = pth ))
907
+ cwd = pth ))
901
908
zstats .append (self ._gen_fname ('zstat%d.nii' % (base_contrast + i ),
902
- cwd = pth ))
909
+ cwd = pth ))
903
910
tstats .append (self ._gen_fname ('tstat%d.nii' % (base_contrast + i ),
904
- cwd = pth ))
911
+ cwd = pth ))
905
912
neffs .append (self ._gen_fname ('neff%d.nii' % (base_contrast + i ),
906
- cwd = pth ))
913
+ cwd = pth ))
907
914
if copes :
908
915
outputs ['copes' ] = copes
909
916
outputs ['varcopes' ] = varcopes
@@ -914,10 +921,10 @@ def _list_outputs(self):
914
921
zfstats = []
915
922
for i in range (numfcons ):
916
923
fstats .append (self ._gen_fname ('fstat%d.nii' % (base_contrast + i ),
917
- cwd = pth ))
924
+ cwd = pth ))
918
925
zfstats .append (
919
926
self ._gen_fname ('zfstat%d.nii' % (base_contrast + i ),
920
- cwd = pth ))
927
+ cwd = pth ))
921
928
if fstats :
922
929
outputs ['fstats' ] = fstats
923
930
outputs ['zfstats' ] = zfstats
@@ -926,7 +933,7 @@ def _list_outputs(self):
926
933
927
934
class L2ModelInputSpec (BaseInterfaceInputSpec ):
928
935
num_copes = traits .Int (min = 1 , mandatory = True ,
929
- desc = 'number of copes to be combined' )
936
+ desc = 'number of copes to be combined' )
930
937
931
938
932
939
class L2ModelOutputSpec (TraitedSpec ):
@@ -1024,7 +1031,7 @@ class MultipleRegressDesignInputSpec(BaseInterfaceInputSpec):
1024
1031
mandatory = True ,
1025
1032
desc = 'dictionary containing named lists of regressors' )
1026
1033
groups = traits .List (traits .Int ,
1027
- desc = 'list of group identifiers (defaults to single group)' )
1034
+ desc = 'list of group identifiers (defaults to single group)' )
1028
1035
1029
1036
1030
1037
class MultipleRegressDesignOutputSpec (TraitedSpec ):
@@ -1104,7 +1111,7 @@ def _run_interface(self, runtime):
1104
1111
convals = np .zeros ((nwaves , 1 ))
1105
1112
for regidx , reg in enumerate (self .inputs .contrasts [idx ][2 ]):
1106
1113
convals [regs .index (reg )
1107
- ] = self .inputs .contrasts [idx ][3 ][regidx ]
1114
+ ] = self .inputs .contrasts [idx ][3 ][regidx ]
1108
1115
con_txt .append (' ' .join (['%e' % val for val in convals ]))
1109
1116
con_txt = '\n ' .join (con_txt )
1110
1117
# write f-con file
@@ -1163,11 +1170,11 @@ def _list_outputs(self):
1163
1170
class SMMInputSpec (FSLCommandInputSpec ):
1164
1171
spatial_data_file = File (
1165
1172
exists = True , position = 0 , argstr = '--sdf="%s"' , mandatory = True ,
1166
- desc = "statistics spatial map" , copyfile = False )
1173
+ desc = "statistics spatial map" , copyfile = False )
1167
1174
mask = File (exist = True , position = 1 , argstr = '--mask="%s"' , mandatory = True ,
1168
1175
desc = "mask file" , copyfile = False )
1169
1176
no_deactivation_class = traits .Bool (position = 2 , argstr = "--zfstatmode" ,
1170
- desc = "enforces no deactivation class" )
1177
+ desc = "enforces no deactivation class" )
1171
1178
1172
1179
1173
1180
class SMMOutputSpec (TraitedSpec ):
@@ -1202,7 +1209,7 @@ def _list_outputs(self):
1202
1209
class MELODICInputSpec (FSLCommandInputSpec ):
1203
1210
in_files = InputMultiPath (
1204
1211
File (exists = True ), argstr = "-i %s" , mandatory = True , position = 0 ,
1205
- desc = "input file names (either single file name or a list)" )
1212
+ desc = "input file names (either single file name or a list)" )
1206
1213
out_dir = Directory (
1207
1214
argstr = "-o %s" , desc = "output directory name" , genfile = True )
1208
1215
mask = File (exists = True , argstr = "-m %s" ,
@@ -1505,7 +1512,7 @@ class RandomiseInputSpec(FSLCommandInputSpec):
1505
1512
position = 0 , mandatory = True )
1506
1513
base_name = traits .Str (
1507
1514
'tbss_' , desc = 'the rootname that all generated files will have' ,
1508
- argstr = '-o "%s"' , position = 1 , usedefault = True )
1515
+ argstr = '-o "%s"' , position = 1 , usedefault = True )
1509
1516
design_mat = File (
1510
1517
exists = True , desc = 'design matrix file' , argstr = '-d %s' , position = 2 )
1511
1518
tcon = File (
@@ -1518,27 +1525,27 @@ class RandomiseInputSpec(FSLCommandInputSpec):
1518
1525
desc = 'demean data temporally before model fitting' , argstr = '-D' )
1519
1526
one_sample_group_mean = traits .Bool (
1520
1527
desc = 'perform 1-sample group-mean test instead of generic permutation test' ,
1521
- argstr = '-1' )
1528
+ argstr = '-1' )
1522
1529
show_total_perms = traits .Bool (
1523
1530
desc = 'print out how many unique permutations would be generated and exit' ,
1524
- argstr = '-q' )
1531
+ argstr = '-q' )
1525
1532
show_info_parallel_mode = traits .Bool (
1526
1533
desc = 'print out information required for parallel mode and exit' ,
1527
- argstr = '-Q' )
1534
+ argstr = '-Q' )
1528
1535
vox_p_values = traits .Bool (
1529
1536
desc = 'output voxelwise (corrected and uncorrected) p-value images' ,
1530
- argstr = '-x' )
1537
+ argstr = '-x' )
1531
1538
tfce = traits .Bool (
1532
1539
desc = 'carry out Threshold-Free Cluster Enhancement' , argstr = '-T' )
1533
1540
tfce2D = traits .Bool (
1534
1541
desc = 'carry out Threshold-Free Cluster Enhancement with 2D optimisation' ,
1535
- argstr = '--T2' )
1542
+ argstr = '--T2' )
1536
1543
f_only = traits .Bool (desc = 'calculate f-statistics only' , argstr = '--f_only' )
1537
1544
raw_stats_imgs = traits .Bool (
1538
1545
desc = 'output raw ( unpermuted ) statistic images' , argstr = '-R' )
1539
1546
p_vec_n_dist_files = traits .Bool (
1540
1547
desc = 'output permutation vector and null distribution text files' ,
1541
- argstr = '-P' )
1548
+ argstr = '-P' )
1542
1549
num_perm = traits .Int (
1543
1550
argstr = '-n %d' , desc = 'number of permutations (default 5000, set to 0 for exhaustive)' )
1544
1551
seed = traits .Int (
@@ -1609,9 +1616,9 @@ class Randomise(FSLCommand):
1609
1616
def _list_outputs (self ):
1610
1617
outputs = self .output_spec ().get ()
1611
1618
outputs ['tstat_files' ] = glob (self ._gen_fname (
1612
- '%s_tstat*.nii' % self .inputs .base_name ))
1619
+ '%s_tstat*.nii' % self .inputs .base_name ))
1613
1620
outputs ['fstat_files' ] = glob (self ._gen_fname (
1614
- '%s_fstat*.nii' % self .inputs .base_name ))
1621
+ '%s_fstat*.nii' % self .inputs .base_name ))
1615
1622
prefix = False
1616
1623
if self .inputs .tfce or self .inputs .tfce2D :
1617
1624
prefix = 'tfce'
@@ -1623,7 +1630,7 @@ def _list_outputs(self):
1623
1630
prefix = 'clusterm'
1624
1631
if prefix :
1625
1632
outputs ['t_p_files' ] = glob (self ._gen_fname (
1626
- '%s_%s_p_tstat*' % (self .inputs .base_name , prefix )))
1633
+ '%s_%s_p_tstat*' % (self .inputs .base_name , prefix )))
1627
1634
outputs ['t_corrected_p_files' ] = glob (self ._gen_fname (
1628
1635
'%s_%s_corrp_tstat*.nii' % (self .inputs .base_name , prefix )))
1629
1636
@@ -1638,22 +1645,22 @@ class GLMInputSpec(FSLCommandInputSpec):
1638
1645
in_file = File (exists = True , argstr = '-i %s' , mandatory = True , position = 1 ,
1639
1646
desc = 'input file name (text matrix or 3D/4D image file)' )
1640
1647
out_file = File (argstr = '-o %s' , genfile = True , position = 3 ,
1641
- desc = ('filename for GLM parameter estimates'
1642
- + ' (GLM betas)' ))
1648
+ desc = ('filename for GLM parameter estimates'
1649
+ + ' (GLM betas)' ))
1643
1650
design = File (exists = True , argstr = '-d %s' , mandatory = True , position = 2 ,
1644
- desc = ('file name of the GLM design matrix (text time'
1645
- + ' courses for temporal regression or an image'
1646
- + ' file for spatial regression)' ))
1651
+ desc = ('file name of the GLM design matrix (text time'
1652
+ + ' courses for temporal regression or an image'
1653
+ + ' file for spatial regression)' ))
1647
1654
contrasts = File (exists = True , argstr = '-c %s' , desc = ('matrix of t-statics'
1648
1655
+ ' contrasts' ))
1649
1656
mask = File (exists = True , argstr = '-m %s' , desc = ('mask image file name if'
1650
1657
+ ' input is image' ))
1651
1658
dof = traits .Int (argstr = '--dof %d' , desc = ('set degrees of freedom'
1652
1659
+ ' explicitly' ))
1653
1660
des_norm = traits .Bool (argstr = '--des_norm' , desc = ('switch on normalization'
1654
- + ' of the design matrix'
1655
- + ' columns to unit std'
1656
- + ' deviation' ))
1661
+ + ' of the design matrix'
1662
+ + ' columns to unit std'
1663
+ + ' deviation' ))
1657
1664
dat_norm = traits .Bool (argstr = '--dat_norm' , desc = ('switch on normalization'
1658
1665
+ ' of the data time'
1659
1666
+ ' series to unit std'
@@ -1665,30 +1672,30 @@ class GLMInputSpec(FSLCommandInputSpec):
1665
1672
out_cope = File (argstr = '--out_cope=%s' ,
1666
1673
desc = 'output file name for COPE (either as txt or image' )
1667
1674
out_z_name = File (argstr = '--out_z=%s' ,
1668
- desc = 'output file name for Z-stats (either as txt or image' )
1675
+ desc = 'output file name for Z-stats (either as txt or image' )
1669
1676
out_t_name = File (argstr = '--out_t=%s' ,
1670
- desc = 'output file name for t-stats (either as txt or image' )
1677
+ desc = 'output file name for t-stats (either as txt or image' )
1671
1678
1672
1679
out_p_name = File (argstr = '--out_p=%s' ,
1673
- desc = ('output file name for p-values of Z-stats (either as'
1674
- + ' text file or image)' ))
1680
+ desc = ('output file name for p-values of Z-stats (either as'
1681
+ + ' text file or image)' ))
1675
1682
out_f_name = File (argstr = '--out_f=%s' ,
1676
- desc = 'output file name for F-value of full model fit' )
1683
+ desc = 'output file name for F-value of full model fit' )
1677
1684
out_pf_name = File (argstr = '--out_pf=%s' ,
1678
- desc = 'output file name for p-value for full model fit' )
1685
+ desc = 'output file name for p-value for full model fit' )
1679
1686
out_res_name = File (argstr = '--out_res=%s' ,
1680
- desc = 'output file name for residuals' )
1687
+ desc = 'output file name for residuals' )
1681
1688
out_varcb_name = File (argstr = '--out_varcb=%s' ,
1682
- desc = 'output file name for variance of COPEs' )
1689
+ desc = 'output file name for variance of COPEs' )
1683
1690
1684
1691
out_sigsq_name = File (argstr = '--out_sigsq=%s' ,
1685
- desc = ('output file name for residual noise variance'
1686
- + ' sigma-square' ))
1692
+ desc = ('output file name for residual noise variance'
1693
+ + ' sigma-square' ))
1687
1694
out_data_name = File (argstr = '--out_data=%s' ,
1688
- desc = 'output file name for pre-processed data' )
1695
+ desc = 'output file name for pre-processed data' )
1689
1696
out_vnscales_name = File (argstr = '--out_vnscales=%s' ,
1690
- desc = ('output file name for scaling factors for variance'
1691
- + ' normalisation' ))
1697
+ desc = ('output file name for scaling factors for variance'
1698
+ + ' normalisation' ))
1692
1699
1693
1700
1694
1701
class GLMOutputSpec (TraitedSpec ):
0 commit comments