Skip to content

Commit 3824845

Browse files
committed
🔀 Merge source into doc/xcpqc
2 parents e036a36 + 63a2050 commit 3824845

File tree

8 files changed

+131
-24
lines changed

8 files changed

+131
-24
lines changed

docs/_sources/developer/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Contents:
1818
installation
1919
pipeline
2020
nodes
21+
random_state
2122
workflow_documentation
2223
workflows/index
2324
xcpqc

docs/_sources/developer/nodes.rst

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
*****
22
Nodes
33
*****
4-
54
.. _mem_gb:
65

76
.. _n_procs:
@@ -23,8 +22,10 @@ When a developer creates or modifies a Node in C-PAC, a ``mem_gb`` and ``n_procs
2322

2423
For nodes that will use a varying amount of memory depending on the node's input data, the optional parameter ``mem_x`` takes a tuple of ``(memory multiplier, input file, multiplier mode)`` where ``memory multiplier`` is a number and ``input file`` is the string name of the Node input to multiply such that the memory estimate returned by the ``mem_gb`` attribute is the ``mem_gb`` argument plus ``memory multiplier`` times the dimensions of the ``input file`` as specified in the ``multiplier mode`` (``xyzt`` (spatial × temporal; default), ``xyz`` (spatial), or just ``t`` (temporal)).
2524

26-
.. note::
27-
``mem_x`` is a new parameter in C-PAC v1.8.1 and subject to change in future releases as we continue to `develop methods for setting data- and operation-dependent memory estimates <https://github.com/FCP-INDI/C-PAC/issues/1509>`_.
25+
26+
.. note::
27+
``mem_x`` is a new parameter in C-PAC v1.8.1 and subject to change in future releases as we continue to `develop methods for setting data- and operation-dependent memory estimates <https://github.com/FCP-INDI/C-PAC/issues/1509>`_.
28+
2829

2930
.. autoclass:: CPAC.pipeline.nipype_pipeline_engine.Node
3031
:special-members: __init__
@@ -36,17 +37,33 @@ For nodes that will use a varying amount of memory depending on the node's input
3637
:members:
3738
:inherited-members:
3839

40+
.. autoclass:: nipype.interfaces.base.core.Interface
41+
:special-members: __init__
42+
:members:
43+
:inherited-members:
44+
45+
46+
.. seealso::
47+
`Nipype: Interface Specifications <https://nipype.readthedocs.io/en/1.5.1/devel/interface_specs.html>`_
48+
49+
50+
.. autoclass:: CPAC.utils.interfaces.function.Function
51+
:special-members: __init__
52+
:members:
53+
:inherited-members:
54+
3955
.. autoclass:: CPAC.pipeline.nipype_pipeline_engine.Workflow
4056
:special-members: __init__
4157
:members:
4258
:inherited-members:
4359

60+
4461
The Nipype utility function :py:func:`~nipype.utils.draw_gantt_chart.log_to_dict` reads a log file generated by ``log_nodes_cb`` to a Python dictionary.
4562

63+
4664
.. autofunction:: CPAC.utils.monitoring.log_nodes_cb
4765

48-
draw_gantt_chart
49-
================
66+
5067

5168
.. automodule:: CPAC.utils.monitoring.draw_gantt_chart
5269
:members: resource_report, log_to_dict, generate_gantt_chart, resource_overusage_report
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Random State
2+
============
3+
4+
When performing reproducibility/variability experiments, it is important to isolate sources of variability. One such source is random state.
5+
6+
Users can fix the random state of C-PAC's execution by specifying a random seed. When adding a Node that should accept a user-specified random seed, add
7+
8+
* the :py:class:`nipype.interfaces.base.core.Interface` and the corresponding flags to add/remove to set the random seed, or
9+
* in the case of a :py:class:`CPAC.utils.interfaces.function.Function` Node, the Function node's function and a function to apply to that function definition to set the random seed
10+
11+
to :py:func:`CPAC.pipeline.random_state.seed.random_seed_flags`.
12+
13+
.. autofunction:: CPAC.pipeline.random_state.seed.random_seed_flags

docs/_sources/user/pipelines/design_a_pipeline.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ Design A Pipeline
1313

1414
C-PAC offers a graphical interface you can use to quickly and easily modify the default pipeline or create your own from scratch: `https://fcp-indi.github.io/C-PAC_GUI/ <https://fcp-indi.github.io/C-PAC_GUI/>`_
1515

16-
.. note::
16+
.. note::
17+
18+
Currently the GUI creates a C-PAC v1.6.0 pipeline configuration file. This syntax persisted through v1.7.2 but is deprecated with the release of v1.8.0.
1719

18-
Currently the GUI creates a C-PAC v1.6.0 pipeline configuration file. This syntax persisted through v1.7.2 but is deprecated with the release of v1.8.0.
20+
If given a pipeline file in the older syntax, C-PAC v1.8 will attempt to convert the pipeline configuration file to the new syntax, saving the converted file in your output directory.
1921

20-
If given a pipeline file in the older syntax, C-PAC v1.8 will attempt to convert the pipeline configuration file to the new syntax, saving the converted file in your output directory.
22+
An update to the GUI to create v1.8.0 syntax configuration files is underway.
2123

22-
An update to the GUI to create v1.8.0 syntax configuration files is underway.
24+
The newer (v1.8) syntax will not work with older versions of C-PAC.
2325

24-
The newer (v1.8) syntax will not work with older versions of C-PAC.
26+
See :ref:`using_a_text_editor` for configuring a custom pipeline without the GUI.
27+
28+
.. seealso::
2529

26-
See :ref:`using_a_text_editor` for configuring a custom pipeline without the GUI.
27-
28-
.. seealso::
29-
30-
:doc:`Details about mapping the older syntax to the new. </user/pipelines/1.7-1.8-nesting-mappings>`
30+
:doc:`Details about mapping the older syntax to the new. </user/pipelines/1.7-1.8-nesting-mappings>`
3131

3232
.. figure:: /_images/gui_home1.png
3333

docs/_sources/user/pipelines/pipeline_config.rst

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,10 @@ Definitions
3737
.. include:: /glossary/template.rst
3838
:start-line: 3
3939

40-
.. rubric:: Reference
41-
42-
.. bibliography:: /references/glossary.bib
43-
:style: cpac_docs_style
44-
:cited:
45-
:keyprefix: glossary-
4640

4741
.. include:: design_a_pipeline.rst
4842

43+
4944
.. _using_a_text_editor:
5045

5146
Using a Text Editor
@@ -97,6 +92,39 @@ Why a list?
9792
'''''''''''
9893
You may notice as you learn about the settings for various outputs that many of the values for C-PAC's configurable settings are stored in lists (i.e., multiple values are separated by commas and surrounded by square brackets). Such lists containing ``On``s and ``Off``s (for ``True`` and ``False`` respectively) allow you to toggle on multiple options at the same time, and branch a pipeline into two different analysis strategies. See the `developer documentation <http://fcp-indi.github.io/docs/developer/workflows/cpac_pipeline.html>`_ for more information about how lists are used in C-PAC.
9994

95+
Configurable Settings
96+
------------------------------
97+
98+
.. raw:: html
99+
100+
<div class="flowchart-container"><object data="../_static/flowcharts/pipeline-individual.svg" type="image/svg+xml"></object></div>
101+
102+
Data Management and Environment Settings
103+
'''''''''''''''''''''''''''''''''''''''''
104+
105+
* :doc:`Computer Settings </user/compute_config>`
106+
* :doc:`Output Settings </user/output_config>`
107+
* :doc:`Random State </user/pipelines/random_state>`
108+
109+
Pre- and post-processing
110+
'''''''''''''''''''''''''
111+
112+
* :doc:`Anatomical Preprocessing </user/anat>`
113+
* :doc:`Functional Preprocessing </user/func>`
114+
* :doc:`Nuisance Corrections </user/nuisance>`
115+
* :doc:`Time Series Extraction </user/tse>`
116+
* :doc:`After Warp Settings </user/after_warp>`
117+
118+
Derivatives
119+
'''''''''''
120+
121+
* :doc:`Seed-based Correlation Analysis (SCA) and Dual Regression </user/sca>` - Analyze the connectivity between brain regions.
122+
* :doc:`Voxel-mirrored Homotopic Connectivity (VMHC) </user/vmhc>` - Investigate connectivity between hemispheres.
123+
* :doc:`Amplitude of Low Frequency Fluctuations (ALFF) and fractional ALFF (fALFF) </user/alff>` - Measure the power of slow fluctuations in brain activity.
124+
* :doc:`Regional Homogeneity (ReHo) </user/reho>` - Measure the similarity of activity patterns across neighboring voxels.
125+
* :doc:`Network Centrality </user/centrality>` - Analyze the structure of functional networks.
126+
127+
100128
.. toctree::
101129
:maxdepth: 2
102130

@@ -106,3 +134,12 @@ You may notice as you learn about the settings for various outputs that many of
106134
pre-and-post
107135
derivatives
108136
quality
137+
138+
139+
.. rubric:: Reference
140+
141+
142+
.. bibliography:: /references/glossary.bib
143+
:style: cpac_docs_style
144+
:cited:
145+
:keyprefix: glossary-

docs/_sources/user/pipelines/preconfig.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ This pipeline is designed to increase reproducibility with the preprocessing res
8484
* `https://github.com/poldracklab/fmriprep <https://github.com/poldracklab/fmriprep>`_
8585
* `https://www.nature.com/articles/s41592-018-0235-4 <https://www.nature.com/articles/s41592-018-0235-4>`_
8686

87+
rbc-options: ReproBrainChart Options Pipeline
88+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89+
90+
Pipeline Configuration YAML: `https://github.com/FCP-INDI/C-PAC/blob/main/CPAC/resources/configs/pipeline_config_rbc-options.yml <https://github.com/FCP-INDI/C-PAC/blob/main/CPAC/resources/configs/pipeline_config_rbc-options.yml>`_
91+
8792
benchmark-ANTS: C-PAC Benchmark with ANTs Registration
8893
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8994

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Random State
2+
============
3+
4+
When performing reproducibility/variability experiments, it is important to isolate sources of variability. One such source is random state.
5+
6+
Random seed can be set in pipeline config
7+
8+
.. literalinclude:: /references/default_pipeline.yml
9+
:language: YAML
10+
:start-at: pipeline_setup:
11+
:lines: 1
12+
13+
.. literalinclude:: /references/default_pipeline.yml
14+
:language: YAML
15+
:start-at: system_config:
16+
:end-before: # Select Off if you intend to run CPAC on a single machine.
17+
18+
or on the command line with ``--random_seed $SEED``.
19+
20+
Valid options are positive integers up to 2,147,483,647 or the word 'random' (which will set an integer in that range). If not specified, a seed will not be set, and each relevant process will run with an undocumented random seed.
21+
22+
When a seed is set, a ``random.log`` file, including the constant seed and each node the seed was applied to, will be generated in the logging directory.
23+
24+
The following processes currently support this feature:
25+
26+
.. exec::
27+
from CPAC.pipeline.random_state.seed import random_seed_flags, \
28+
set_up_random_state
29+
set_up_random_state('random')
30+
processes = random_seed_flags()
31+
for interface in processes['interfaces'].keys():
32+
print(interface._cmd)
33+
for fxn in processes['functions'].keys():
34+
print('.'.join([fxn.__module__, fxn.__name__]))

docs/_sources/user/singularity.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ Run on Singularity
33

44
For those who wish to avoid the administrator rights requirements often associated with Docker usage (or the security hazards when used on a shared computing system), `Singularity <https://singularityhub.github.io/singularityhub-docs/>`_ is a good option. Singularity is a container solution just like Docker, except it is designed specifically to offer secure deployment on shared cluster environments.
55

6-
You can pull a Singularity container much like how you would pull a Docker container, except you are pulling from `Singularity Hub <https://singularityhub.github.io/singularityhub-docs/>`_:
6+
You can pull a Singularity container much like how you would pull a Docker container:
77

88
.. code-block:: console
99
10-
singularity pull shub://FCP-INDI/C-PAC
10+
singularity pull docker://fcpindi/c-pac:latest
1111
12-
This will produce a Singularity container image in your current directory, named something like ``FCP-INDI-C-PAC-master-latest.simg``.
12+
This will produce a Singularity container image in your current directory, named something like ``c-pac_latest.sif``. You can instead specify the local filename you want before the ``docker://`` URI.
1313

1414
Running a Singularity image is similar to running a Docker image, except ``-B`` maps local directories to a location in the Singularity image instead of ``-v``:
1515

0 commit comments

Comments
 (0)