Skip to content

Commit

Permalink
Merge pull request #784 from FCP-INDI/1.0.4_development
Browse files Browse the repository at this point in the history
1.0.4 development (now release v1.1.0)
  • Loading branch information
sgiavasis authored May 17, 2018
2 parents 4a47720 + 14557b6 commit 63cc8ac
Show file tree
Hide file tree
Showing 58 changed files with 6,171 additions and 5,557 deletions.
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,19 @@ pip-log.txt
.coverage
.tox

#Translations
# Translations
*.mo

#Mr Developer
# Mr Developer
.mr.developer.cfg

#CPAC Specific
# CPAC Specific
/doc/_build

#Eclipse project files
# Eclipse project files
.project
.pydevproject

# Transpiling and compiling
*.c
*.so
24 changes: 15 additions & 9 deletions CPAC/GUI/interface/pages/functional_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ def __init__(self, parent, counter =0):
comment="Interpolate voxel time courses so they are "
"sampled at the same time points.",
values=["On", "Off", "On/Off"],
wkf_switch = True)
wkf_switch=True)

self.page.add(label="TR (in seconds) ",
control=control.TEXT_BOX,
name='TR',
type=dtype.NUM,
values= "None",
validator = CharValidator("no-alpha"),
values="None",
validator=CharValidator("no-alpha"),
comment="Specify the TR (in seconds) at which images "
"were acquired."
"\n\nDefault is None- TR information is then "
Expand Down Expand Up @@ -96,14 +96,14 @@ def __init__(self, parent, counter =0):
control=control.TEXT_BOX,
name='stopIdx',
type=dtype.NUM,
values="End",
values="None",
validator=CharValidator("no-alpha"),
comment="Last timepoint to include in analysis.\n\n"
"Default is None or End (end of timeseries).\n"
"\nLast timepoint selection in the scan "
"parameters in the data configuration file, if "
"present, will over-ride this selection.\n\n"
"NOte: the selection here applies to all scans "
"Note: the selection here applies to all scans "
"of all participants.")

self.page.set_sizer()
Expand All @@ -123,7 +123,7 @@ def __init__(self, parent, counter =0):
self.counter = counter
fsl = os.environ.get('FSLDIR')
if fsl == None:
fsl = "$FSLDIR"
fsl = "$FSLDIR"

self.page.add(label="Perform Field Map Distortion Correction ",
control=control.CHOICE_BOX,
Expand Down Expand Up @@ -282,9 +282,15 @@ def __init__(self, parent, counter = 0):
control=control.CHOICE_BOX,
name='runRegisterFuncToMNI',
type=dtype.LSTR,
comment="Register functional images to a standard MNI152 template.\n\nThis option must be enabled if you wish to calculate any derivatives.",
values=["On","Off"],
wkf_switch = True)
comment="Register functional images to a standard "
"MNI152 template.\n\nThis option must be "
"enabled if you wish to calculate any "
"derivatives. If set to On [1], only the "
"template-space files will be output. If set "
"to On/Off [1,0], both template-space and "
"native-space files will be output.",
values=["On", "On/Off", "Off"],
wkf_switch=True)

self.page.add(label="Functional-to-Template Resolution ",
control=control.CHOICE_BOX,
Expand Down
15 changes: 10 additions & 5 deletions CPAC/GUI/interface/pages/nuisance.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, parent, counter = 0):
name='runNuisance',
type=dtype.LSTR,
comment="Run Nuisance Signal Regression",
values=["Off","On","On/Off"],
values=["Off", "On", "On/Off"],
wkf_switch = True)

self.page.add(label="Lateral Ventricles Mask (Standard Space) ",
Expand Down Expand Up @@ -89,12 +89,17 @@ def __init__(self, parent, counter = 0):
values=["On", "Off", "On/Off"])

self.page.add(label="Motion Spike De-Noising ",
control=control.CHOICE_BOX,
control=control.CHECKLIST_BOX,
name='runMotionSpike',
type=dtype.LSTR,
comment="Remove or regress out volumes exhibiting "
"excessive motion.",
values=["Off", "De-Spiking", "Scrubbing"],
"excessive motion.\n\nEach of these options "
"are mutually exclusive, and selecting more "
"than one will create a new pipeline fork "
"for each option. For example, de-spiking and "
"scrubbing will not run within the same "
"pipeline strategy.",
values=["None", "De-Spiking", "Scrubbing"],
wkf_switch=True)

self.page.add(label="Framewise Displacement (FD) Calculation ",
Expand All @@ -111,7 +116,7 @@ def __init__(self, parent, counter = 0):
control=control.TEXT_BOX,
name='spikeThreshold',
type=dtype.LNUM,
values="5%",
values="0.2",
validator=CharValidator("no-alpha"),
comment="(Motion Spike De-Noising only) Specify the "
"maximum acceptable Framewise Displacement "
Expand Down
51 changes: 38 additions & 13 deletions CPAC/GUI/interface/pages/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,27 +216,41 @@ def __init__(self, parent, counter=0):
"to the S3 bucket",
values=["On", "Off"])

self.page.add(label="Create Symbolic Links ",
self.page.add(label="Write Extra Functional Outputs ",
control=control.CHOICE_BOX,
name='runSymbolicLinks',
name='write_func_outputs',
type=dtype.LSTR,
comment="Create a user-friendly, well organized version of the output directory.\n\n"
"We recommend all users enable this option.",
values=["On", "Off"])
comment="Include extra versions and intermediate steps "
"of functional preprocessing in the output "
"directory.",
values=["Off", "On"])

#self.page.add(label="Enable Quality Control Interface ",
# control=control.CHOICE_BOX,
# name='generateQualityControlImages',
# type=dtype.LSTR,
# comment="Generate quality control pages containing preprocessing and derivative outputs.",
# values=["On", "Off"])
self.page.add(label="Write Debugging Outputs ",
control=control.CHOICE_BOX,
name='write_debugging_outputs',
type=dtype.LSTR,
comment="Include extra outputs in the output "
"directory that may be of interest when more "
"information is needed.",
values=["Off", "On"])

self.page.add(label="Enable Quality Control Interface ",
control=control.CHOICE_BOX,
name='generateQualityControlImages',
type=dtype.LSTR,
comment="Generate quality control pages containing "
"preprocessing and derivative outputs.",
values=["On", "Off"])

self.page.add(label="Remove Working Directory ",
control=control.CHOICE_BOX,
name='removeWorkingDir',
type=dtype.BOOL,
values=["False", "True"],
comment="Deletes the contents of the Working Directory after running.\n\nThis saves disk space, but any additional preprocessing or analysis will have to be completely re-run.")
comment="Deletes the contents of the Working "
"Directory after running.\n\nThis saves disk "
"space, but any additional preprocessing or "
"analysis will have to be completely re-run.")

self.page.add(label="Run Logging ",
control=control.CHOICE_BOX,
Expand All @@ -251,7 +265,18 @@ def __init__(self, parent, counter=0):
name='reGenerateOutputs',
type=dtype.BOOL,
values=["False", "True"],
comment="Uses the contents of the Working Directory to regenerate all outputs and their symbolic links.\n\nRequires an intact Working Directory from a previous CPAC run.")
comment="Uses the contents of the Working Directory "
"to regenerate all outputs and their "
"symbolic links.\n\nRequires an intact "
"Working Directory from a previous CPAC run.")

self.page.add(label="Create Symbolic Links ",
control=control.CHOICE_BOX,
name='runSymbolicLinks',
type=dtype.LSTR,
comment="Create a user-friendly, well organized "
"version of the output directory.",
values=["On", "Off"])

self.page.set_sizer()
parent.get_page_list().append(self)
Expand Down
60 changes: 44 additions & 16 deletions CPAC/GUI/interface/pages/smoothing.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ def get_counter(self):
return self.counter



class AfterWarpingOptions(wx.ScrolledWindow):

def __init__(self, parent, counter = 0):
Expand All @@ -29,24 +28,53 @@ def __init__(self, parent, counter = 0):
self.counter = counter

self.page = GenericClass(self, "After Warping Options")

self.page.add(label= "Smoothing Kernel FWHM (in mm) ",
control=control.TEXT_BOX,
name='fwhm',
type=dtype.LNUM,
values= "4",
validator = CharValidator("no-alpha"),
comment="Full Width at Half Maximum of the Gaussian kernel used during spatial smoothing.\n\nCan be a single value or multiple values separated by commas.\n\nNote that spatial smoothing is run as the last step in the individual-level analysis pipeline, such that all derivatives are output both smoothed and unsmoothed.")

self.page.add(label="Z-score Standardize Derivatives ",

self.page.add(label="Run Smoothing ",
control=control.CHOICE_BOX,
name='run_smoothing',
type=dtype.LSTR,
comment="Smooth the derivative outputs.\n\nOn - Run "
"smoothing and output only the smoothed "
"outputs.\nOn/Off - Run smoothing and output "
"both the smoothed and non-smoothed outputs.\n"
"Off - Don't run smoothing.",
values=["On", "On/Off", "Off"])

self.page.add(label="Smoothing Kernel FWHM (in mm) ",
control=control.TEXT_BOX,
name='fwhm',
type=dtype.LNUM,
values= "4",
validator = CharValidator("no-alpha"),
comment="Full Width at Half Maximum of the Gaussian "
"kernel used during spatial smoothing.\n\nCan "
"be a single value or multiple values "
"separated by commas.\n\nNote that spatial "
"smoothing is run as the last step in the "
"individual-level analysis pipeline, such "
"that all derivatives are output both "
"smoothed and unsmoothed.")

self.page.add(label="Smooth Before/After z-Scoring ",
control=control.CHOICE_BOX,
name='smoothing_order',
type=dtype.LSTR,
comment="Choose whether to smooth outputs before or "
"after z-scoring.",
values=["Before", "After"])

self.page.add(label="z-score Standardize Derivatives ",
control=control.CHOICE_BOX,
name='runZScoring',
type=dtype.LSTR,
comment="Decides format of outputs. Off will produce" \
" non-z-scored outputs, On will produce" \
" z-scores of outputs and non-z-scored " \
"outputs.",
values=["On", "Off"])
comment="z-score standardize the derivatives. This is "
"required for group-level analysis.\n\n"
"On - Run z-scoring and output only the "
"z-scored outputs.\nOn/Off - Run z-scoring and "
"output both the z-scored and raw score "
"versions of the outputs.\nOff - Don't run "
"z-scoring.",
values=["On", "On/Off", "Off"])

self.page.set_sizer()
parent.get_page_list().append(self)
Expand Down
5 changes: 2 additions & 3 deletions CPAC/GUI/interface/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ def enum(**enums):
'ANTS & FSL': 11,
'3dAutoMask & BET': 12,
'ALFF':'alff_to_standard_zstd',
'ALFF (smoothed)':'alff_to_standard_smooth_zstd',
'ALFF (smoothed)':'alff_to_standard_zstd_smooth',
'f/ALFF':'falff_to_standard_zstd',
'f/ALFF (smoothed)':'falff_to_standard_smooth_zstd',
'f/ALFF (smoothed)':'falff_to_standard_zstd_smooth',
'ReHo':'reho_to_standard_zstd',
'ReHo (smoothed)':'reho_to_standard_smooth_zstd',
'ROI Average SCA':'sca_roi_files_to_standard_fisher_zstd',
Expand All @@ -45,7 +45,6 @@ def enum(**enums):
'Network Centrality (smoothed)': 'centrality_outputs_smoothed_zstd',
'Dual Regression':'dr_tempreg_maps_zstat_files_to_standard',
'Dual Regression (smoothed)':'dr_tempreg_maps_zstat_files_to_standard_smooth',
'End': 'None',
'ROI Average Time Series Extraction': 'roi_average',
'ROI Voxelwise Time Series Extraction': 'roi_voxelwise',
}
Expand Down
Loading

0 comments on commit 63cc8ac

Please sign in to comment.