Skip to content

Commit a5841f7

Browse files
authored
πŸ“š Add text to document how to use custom regressors (#230)
2 parents e944c2f + 3776031 commit a5841f7

File tree

4 files changed

+18
-6
lines changed

4 files changed

+18
-6
lines changed

β€Ž.vscode/launch.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"debugStdLib": true,
2525
"args": [
2626
"-m", "sphinx",
27-
"docs/user/_sources", "docs/user"
27+
"docs/_sources/user", "docs/user"
2828
]
2929
}
3030
]
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
runNuisance,Run Nuisance Signal Correction,"A list where β€˜1’ represents β€˜yes’ and β€˜0’ represents β€˜no’ (e.g., β€˜[1]’)."
22
lateral_ventricles_mask,Standard Lateral Ventricles Binary Mask.,"A path (e.g., $FSLDIR/data/atlases/HarvardOxford/ HarvardOxford-lateral-ventricles-thr25-2mm.nii.gz)."
3-
Regressors,"The nuisance corrections you wish to apply. Corrections include aCompCor, tCompCor, White Matter, Cerebrospinal Fluid, Grey Matter, Global Signal, Motion, Polynomial regression, Bandpass, Censoring.","See below for a full specification of regressors."
3+
Regressors,"The nuisance corrections you wish to apply. Corrections include aCompCor, tCompCor, White Matter, Cerebrospinal Fluid, Grey Matter, Global Signal, Motion, Polynomial regression, Bandpass, Censoring, Custom.","See below for a full specification of regressors."

β€Ždocs/_sources/user/nuisance.rstβ€Ž

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ Median angle correction is another global signal correction approach. It is assu
9898

9999
Principal component analysis (PCA) is used to decompose the resting-state data. Median angle is computed by taking the inverse cosine of each voxel’s time series vector's projection onto the first principal component (i.e. the global mean signal) and then calculating the median over the angles from all the vectors. If an inverse relation is found between the median angle and the mean BOLD signal amplitude, then an additive signal confound is present. As resting-state data sets with high median angles and low mean BOLD magnitudes are likely to be the least contaminated by an additive global confound (He and Liu, 2011), the inverse relation between median angle and mean BOLD magnitude is used to correct for differences in the additive confound. Specifically, the angular distributions of datasets with small median angles can be shifted to attain a larger target median angle to effectively minimize the effects of the global signal confound. The calculation of target angle for median angle correction is described in He and Liu (2011).
100100

101+
Custom Regressors
102+
^^^^^^^^^^^^^^^^^
103+
You can provide your own custom regressor signals beyond those provided by C-PAC (e.g., task encodings or quasi-periodic pattern waveforms).
104+
105+
Each custom regressor must be either a CSV or NIFTI file that contains a single column of the same length as the functional signal with ``1``\s indicating volumes to keep and ``0``\s indicating volumes to censor.
106+
107+
The custom regressor specification also takes a boolean ``convolve`` (default = ``false``).
108+
109+
An example with one custom regressor is included in :ref:`nuisance-no-gui`, below.
110+
101111
Configuring Nuisance Signal Regression Options
102112
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
103113
.. figure:: /_images/nuisance.png
@@ -108,6 +118,8 @@ Configuring Nuisance Signal Regression Options
108118

109119
#. **Select Regressors: - [checkbox: compcor, wm, csf, global, pc1, motion, linear, quadratic]:** Clicking on the *+* icon to the right of the box here will bring up a dialog where you can check off which nuisance variables you would like to include. You may generate multiple sets of nuisance regression strategies in this way. When you are done defining nuisance regression strategies, check the box next to each strategy you would like to run.
110120

121+
.. _nuisance-no-gui:
122+
111123
Configuration Without the GUI
112124
"""""""""""""""""""""""""""""
113125

@@ -120,7 +132,7 @@ The following key/value pairs must be defined in your :doc:`pipeline configurati
120132

121133
The following box contains the full specification for regressors:
122134

123-
.. program-output:: python /build/docs/user/_sources/nuisance_regressors_docstring.py
135+
.. program-output:: python /build/docs/_sources/user/nuisance_regressors_docstring.py
124136

125137
The box below contains an example of what these parameters might look like when defined in the YAML.
126138

β€Ždocs/_sources/nuisance_regressors_docstring.pyβ€Ž renamed to β€Ždocs/_sources/user/nuisance_regressors_docstring.pyβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from CPAC import nuisance
22

3-
nstring = nuisance.create_nuisance_workflow.__doc__[
4-
nuisance.create_nuisance_workflow.__doc__.find(
3+
nstring = nuisance.create_regressor_workflow.__doc__[
4+
nuisance.create_regressor_workflow.__doc__.find(
55
"selector = "
6-
) + len("selector = ") + 1:nuisance.create_nuisance_workflow.__doc__.find(
6+
) + len("selector = ") + 1:nuisance.create_regressor_workflow.__doc__.find(
77
"Workflow Outputs"
88
)
99
].rstrip()[:-1].lstrip('\n')

0 commit comments

Comments
Β (0)