Skip to content

Commit 3bd7bf5

Browse files
committed
Initial creation of separate page discussing running analyses after preparing config file/subject list
1 parent fbf157f commit 3bd7bf5

File tree

5 files changed

+105
-70
lines changed

5 files changed

+105
-70
lines changed

docs/user/_sources/group_analysis.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,3 @@ If you would like to add f-tests, add each f-test as a column to the csv and the
183183

184184
.. figure:: /_images/ga_contrast_ftest.png
185185

186-
Running Group-Level Analysis
187-
""""""""""""""""""""""""""""
188-
When you are finished configuring the pipeline for group-level analysis, click save. When you are ready to run group-level analysis, select the subject lists and pipelines you would like to run and click the Run Group Level Analysis button. You will be presented with a dialog and asked to select which strategies you would like to include.

docs/user/_sources/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ User Guide Index
7474
Setting Up A Subject List <subject_list_config>
7575
Setting Up A Pipeline <pipeline_config>
7676
Setting Up Group Analysis <group_analysis>
77+
Running C-PAC Locally <running>
7778
Running C-PAC in the Cloud <cloud>
7879
Preconfigured Files <files>
7980
C-PAC Benchmark <benchmark>

docs/user/_sources/pipeline_config.txt

Lines changed: 3 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Overview
55

66
There are two ways of setting up a pipeline configuration for C-PAC:
77

8-
* Using a text editor (useful for remote servers where using the GUI is not possible or impractical)
9-
* Using the pipeline configuration interface in the GUI
8+
* Using a text editor (useful for remote servers where using the C-PAC GUI is not possible or impractical)
9+
* Using the pipeline configuration interface in the C-PAC GUI
1010

1111
Definitions
1212
'''''''''''
@@ -43,8 +43,6 @@ If the C-PAC GUI is not open already, type the command ``cpac_gui`` in a termina
4343

4444
When you have finished configuring your pipeline, click *Save*. You will be asked to specify a location to save a configuration file containing information about the pipeline, and to specify a name for the pipeline.
4545

46-
To modify an existing pipeline, select it and click *Edit*. To use a previously configured pipeline, click *Load* and select the appropriate pipeline configuration file. If you have loaded multiple pipelines, use the checkboxes to select which pipelines you would like to run.
47-
4846
Configurable Settings
4947
---------------------
5048

@@ -81,62 +79,8 @@ Derivatives
8179
* :doc:`Regional Homogeneity (ReHo) </reho>` - Measure the similarity of activity patterns across neighboring voxels.
8280
* :doc:`Network Centrality </centrality>` - Analyze the structure of functional networks.
8381

84-
-Derivatives that will be computable in the future, and for which there are currently non-functioning interfaces in the alpha version, will include:
82+
-Derivatives that will be computable in the future, and for which there are currently non-functioning interfaces in the alpha version, include:
8583
-
8684
-* :doc:`Bootstrap Analysis of Stable Clusters (BASC) </basc>` - Quantify the stable characteristics of networks.
8785
-* :doc:`Connectome-wide Association Studies (CWAS) </cwas>` - Explore the relationship between patterns of functional connectivity and phenotypes.
8886

89-
Running Preprocessing and Individual-Level Analysis
90-
---------------------------------------------------
91-
When you are ready to run C-PAC, select the subject lists and pipelines you would like to run and click the *Run Individual Level Analysis* button.
92-
93-
The following schematic illustrates the order in which C-PAC executes.
94-
95-
.. figure:: /_images/processing_workflow.png
96-
97-
98-
Output Structure
99-
^^^^^^^^^^^^^^^^
100-
101-
Symbolic Links
102-
""""""""""""""
103-
C-PAC gives you the option of creating an output directory containing `symbolic links <http://en.wikipedia.org/wiki/Symbolic_link>`_ to processed files. We strongly recommend this setting be enabled, as it makes it much easier to navigate output files. The following schematic shows the structure of the resulting :file:`sym_links` directory:
104-
105-
.. figure:: /_images/symlink_structure.png
106-
107-
Pipeline and strategy folders are named as described above.
108-
109-
File Descriptions
110-
"""""""""""""""""
111-
Preprocessed anatomical data from the Anatomical Preprocessing, Registration, and Segmentation workflows can be found in :file:`../scan/anat/` directory for each subject. The following diagram shows processing steps and standard output files for these workflows.
112-
113-
.. figure:: /_images/anat_prepro_schematic.png
114-
115-
Preprocessed functional data from the Functional Preprocessing workflow can be found in the :file:`../scan_<name>/func` directory for each subject. The following diagram shows processing steps and standard output files for this workflow.
116-
117-
.. figure:: /_images/functional_preprocessing.png
118-
119-
Derivative Outputs
120-
""""""""""""""""""
121-
Derivatives for each subject can be found in the :file:`../scan_<name>` directory of each subject. This folder also contains the outputs of the registration and segmentation workflows.
122-
123-
.. figure:: /_images/derivs_outputs.png
124-
125-
Within each derivative folder will be sub-folders for each set of frequency filters set in :file:`config.yml`, as well as a folder containing smoothed outputs.
126-
127-
Derivatives are output in both native space (:file:`*_img.nii.gz` and :file:`*_map.nii.gz` files), with values transformed to z-scores (:file:`*_Z_*.nii.gz`) and in standard space (:file:`*_to_standard.nii.gz`).
128-
129-
QC Interface
130-
-------------
131-
**Note:** QC pages are currently under development, and their look and functionality will change in future releases.
132-
133-
If you have enabled it in your pipeline configuration, the CPAC Quality Control (QC) interface is an efficient way to rapidly view the outputs of a CPAC run. For each subject, CPAC generates an HTML file containing images of each output and additional information such as motion parameters and signal-to-noise ratios.
134-
135-
.. figure:: /_images/qc_main.png
136-
137-
Though it is possible to view the QC page for each subject individually, we recommend generating a combined QC page that lets you easily navigate between subjects. To do this, open a python terminal and run the following command::
138-
139-
import CPAC
140-
CPAC.utils.create_all_qc.run('/path/to/output_directory')
141-
142-
Alternately, it is of course possible to simply view CPAC outputs using the application of your choice.

docs/user/_sources/running.txt

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
Running C-PAC
2+
==============
3+
Overview
4+
--------
5+
6+
As with configuring the subject list, pipeline configuration, and group analysis files, there are two ways of executing a C-PAC run:
7+
8+
* Using C-PAC's command line interface
9+
* Using the main dialog in the C-PAC GUI
10+
11+
This page will also discuss how to navigate C-PAC's output structure once a run is finished.
12+
13+
Using the Command Line Interface
14+
---------------------------------
15+
Running Preprocessing and Individual-Level Analysis
16+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17+
18+
To start a C-PAC run from the command line or a shell script you can use the `cpac_run.py` utility (which is added to your path automatically upon installing C-PAC). An example of this tool's syntax is as follows:
19+
20+
.. code-block:: bash
21+
22+
cpac_run.py /path/to/pipeline_config.yml /path/to/CPAC_subject_list.yml
23+
24+
Using the GUI
25+
-------------
26+
27+
Running Preprocessing and Individual-Level Analysis
28+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
29+
30+
You have already interacted with the *Subject Lists* and *Pipelines* panes in the main dialog in order to create new subject lists and pipeline configurations. There is, however, more to the main dialog than making new files! Both panes have a *Load* option that will load in any previously created YAML files. Additionally, there is a *View* button that allows you to inspect the text of the YAML files for the currently selected subject list or pipeline configuration.
31+
When you are ready to run C-PAC, select the subject lists and pipelines you would like to run and click the *Run Individual Level Analysis* button.
32+
33+
The following schematic illustrates the order in which C-PAC executes.
34+
35+
.. figure:: /_images/processing_workflow.png
36+
37+
Subject List
38+
39+
If you would like to use a previously generated subject list, click the *Load* button and select the appropriate YAML subject list file. If you have loaded multiple subject lists, use the checkboxes to select which subject lists you would like to run with the pipelines that have been checked in the adjacent *Pipelines* box.
40+
41+
**Note: Do not confuse the *Load* button on the main window of the GUI with the *Load Settings* button on the Subject List Setup window shown above. The latter button is intended to load data configuration files that the subject list setup dialogue can use to create subject lists and will not work with other YAML files. The former button is for already generated subject list files.**
42+
43+
Pipeline
44+
45+
To modify an existing pipeline, select it and click *Edit*.
46+
To use a previously configured pipeline, click *Load* and select the appropriate pipeline configuration file. If you have loaded multiple pipelines, use the checkboxes to select which pipelines you would like to run.
47+
48+
Running Group-Level Analysis
49+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50+
When you are finished configuring the pipeline for group-level analysis, click save. When you are ready to run group-level analysis, select the subject lists and pipelines you would like to run and click the Run Group Level Analysis button. You will be presented with a dialog and asked to select which strategies you would like to include.
51+
52+
Output Structure
53+
----------------
54+
55+
Symbolic Links
56+
^^^^^^^^^^^^^^
57+
C-PAC gives you the option of creating an output directory containing `symbolic links <http://en.wikipedia.org/wiki/Symbolic_link>`_ to processed files. We strongly recommend this setting be enabled, as it makes it much easier to navigate output files. The following schematic shows the structure of the resulting :file:`sym_links` directory:
58+
59+
.. figure:: /_images/symlink_structure.png
60+
61+
Pipeline and strategy folders are named as described above.
62+
63+
File Descriptions
64+
^^^^^^^^^^^^^^^^^
65+
Preprocessed anatomical data from the Anatomical Preprocessing, Registration, and Segmentation workflows can be found in :file:`../scan/anat/` directory for each subject. The following diagram shows processing steps and standard output files for these workflows.
66+
67+
.. figure:: /_images/anat_prepro_schematic.png
68+
69+
Preprocessed functional data from the Functional Preprocessing workflow can be found in the :file:`../scan_<name>/func` directory for each subject. The following diagram shows processing steps and standard output files for this workflow.
70+
71+
.. figure:: /_images/functional_preprocessing.png
72+
73+
Derivative Outputs
74+
^^^^^^^^^^^^^^^^^^
75+
Derivatives for each subject can be found in the :file:`../scan_<name>` directory of each subject. This folder also contains the outputs of the registration and segmentation workflows.
76+
77+
.. figure:: /_images/derivs_outputs.png
78+
79+
Within each derivative folder will be sub-folders for each set of frequency filters set in :file:`config.yml`, as well as a folder containing smoothed outputs.
80+
81+
Derivatives are output in both native space (:file:`*_img.nii.gz` and :file:`*_map.nii.gz` files), with values transformed to z-scores (:file:`*_Z_*.nii.gz`) and in standard space (:file:`*_to_standard.nii.gz`).
82+
83+
QC Interface
84+
-------------
85+
**Note:** QC pages are currently under development, and their look and functionality will change in future releases.
86+
87+
If you have enabled it in your pipeline configuration, the C-PAC Quality Control (QC) interface is an efficient way to rapidly view the outputs of a C-PAC run. For each subject, C-PAC generates an HTML file containing images of each output and additional information such as motion parameters and signal-to-noise ratios.
88+
89+
.. figure:: /_images/qc_main.png
90+
91+
Though it is possible to view the QC page for each subject individually, we recommend generating a combined QC page that lets you easily navigate between subjects. To do this, open a python terminal and run the following command::
92+
93+
import CPAC
94+
CPAC.utils.create_all_qc.run('/path/to/output_directory')
95+
96+
Alternately, it is of course possible to simply view C-PAC outputs using the application of your choice.

docs/user/_sources/subject_list_config.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Overview
44
--------
55
For C-PAC to run an analysis, it must have at least one pipeline configuration file and one subject list. The creation of a pipeline configuration file is treated in the next section. This section will deal with how to create a C-PAC subject list. There are two ways to set up such a list:
66

7+
In order to run C-PAC, you must specify a list of subjects and data files to process. This is done by generating or loading a subject list file that contains information about each subject to be run, their associated image files, and (optionally) scan parameter information for use during :doc:`Slice Timing Correction </func>`.
8+
79
* Using a text editor (useful for servers where using the C-PAC GUI is not possible or impractical)
810
* Using the subject list builder interface in the C-PAC GUI
911

@@ -72,21 +74,16 @@ First, open the C-PAC GUI by entering the command ``cpac_gui`` in a terminal win
7274

7375
.. figure:: /_images/main_gui.png
7476

75-
In order to run C-PAC, you must specify a list of subjects and data files to process. This is done by generating or loading a subject list file that contains information about each subject to be run, their associated image files, and (optionally) scan parameter information for use during :doc:`Slice Timing Correction </func>`.
76-
77-
If you would like to use a previously generated subject list, click the *Load* button and select the appropriate YAML subject list file. If you have loaded multiple subject lists, use the checkboxes to select which subject lists you would like to run with the pipelines that have been checked in the adjacent *Pipelines* box.
78-
79-
If you do not already have a subject list file prepared, click on the *New* button next to the *Subject Lists* box. This will bring up the following dialog window:
77+
Now, to generate a subject list file, click on the *New* button next to the *Subject Lists* box. This will bring up the following dialog window:
8078

8179
.. figure:: /_images/subject_list_gui.png
8280

8381
Each of the options in this window will now be described in the sections below.
8482

85-
**Note: Do not confuse the *Load* button on the main window of the GUI with the *Load Settings* button on the Subject List Setup window shown above. The latter button is intended to load data configuration files that the subject list setup dialogue can use to create subject lists and will not work with other YAML files. The former button is for already generated subject list files.**
8683

8784
Defining Anatomical and Functional File Path Templates
8885
-------------------------------------------------------
89-
CPAC has been designed to process large, complex data sets, and supports processing of multiple scans per subject, multiple scan sessions, and multiple data acquisition sites with differing scan acquisition parameters. Because the file directory structures resulting from such data sets can be complex, it is necessary to manually define the location of the image files to be processed for each subject.
86+
C-PAC has been designed to process large, complex data sets, and supports processing of multiple scans per subject, multiple scan sessions, and multiple data acquisition sites with differing scan acquisition parameters. Because the file directory structures resulting from such data sets can be complex, it is necessary to manually define the location of the image files to be processed for each subject.
9087

9188
File path templates are defined by adding wildcard characters (``%s``) to the file path of each type of image file to be processed (anatomical and functional). For each file path, you will need to add two of these wildcard characters, one in the place of the acquisition site directory, and one in the place of the subject directory. For example, if the full paths to the image files for :file:`subject_01` were::
9289

@@ -127,7 +124,7 @@ If you experience difficulties defining file path templates, you may want to re-
127124

128125
Selectively Include or Exclude Subjects
129126
---------------------------------------
130-
By default, C-PAC will process data for all subjects matching the file templates defined above. In many cases however, a user may want to run only a subset of the subjects within a particular data set. In others, a user may want to exclude particular subjects from analysis. This can be done by specifying a list of subjects through the :file:`subjectList` or :file:`exclusionSubjectList` options. Lists can be specified either as a text file or directly in :file:`data_config.yml`. Text files should contain one subject ID per line, with each subject ID matching the name of a subject folder. The same steps can used with the :file:`siteList` option to selectively process data from specific acquisition sites.
127+
By default, C-PAC will process data for all subjects matching the file templates defined above. In many cases however, you may want to run only a subset of the subjects within a particular data set. In others, you may want to exclude particular subjects from analysis. This can be done by specifying a list of subjects through the :file:`subjectList` or :file:`exclusionSubjectList` options. Lists can be specified either as a text file or directly in :file:`data_config.yml`. Text files should contain one subject ID per line, with each subject ID matching the name of a subject folder. The same steps can used with the :file:`siteList` option to selectively process data from specific acquisition sites.
131128

132129
Set Up Slice Timing Correction
133130
------------------------------

0 commit comments

Comments
 (0)