Bootstrap Analysis of Stable Clusters (BASC)
--------------------------------------------

Introduction & Background
^^^^^^^^^^^^^^^^^^^^^^^^^
Bootstrap Analysis of Stable Clusters (BASC) is a statistical framework that quantifies the stability of Resting State Networks (RSNs) by comparing the results of cluster analysis across replications (Bellec et al. 2010) As it is often impossible or impractical to repeat data collection for an experiment multiple times, BASC utilizes bootstrapping to generate a large number of samples from the existing data. BASC can be used to characterize stable RSNs at both the individual and group levels. 

**Important Note: BASC is currently not fully implemented in C-PAC.  This page is a reference for how to use it in future releases.  An interface is available in the C-PAC GUI, but it is not functional.**

Computation and Analysis Considerations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Individual-level BASC:**

#. For each subject, bootstrapping is applied to the original time series. For each bootstrap, multiple time windows (fixed width) are randomly selected from the original time series (with replacement) to create a new time series of equal length. This results in *B* new time series where *B* is the number of bootstraps set by the user.

#. A clustering algorithm is applied to each new time series. Clustering partitions the 4D data matrix into *C* clusters such that each voxel time series is a member of only one cluster. *C* is the number of clusters specified by the user. This results in *B* adjacency matrices which represent the cluster membership of each voxel.

#. All adjacency matrices are then averaged to form an individual stability matrix which quantifies the stable features (voxel memberships) across replicated time series..

**Group-level BASC:**

#. Bootstrapping is applied to the individual stability matrices. For each bootstrap, subjects are drawn (with replacement) from the original data set to create *B* new sets, each of which have the same number of subjects as the original. This process is intended to mimic random variations in subject recruitment.

#. Within each new data set, individual stability matrices are averaged to create an average stability matrix.

#. A clustering algorithm is applied to each average stability matrix to generate a group-level adjacency matrix.

#. All group-level adjacency matrices are averaged to create a group stability matrix.

#. The group stability matrix is fed into a clustering algorithm to derive stable clusters. 

The figure below (taken from Garcia-Garcia et al.) shows a visual representation of these steps. For more detail on how CPAC computes these steps, please see the `BASC Page of the developer documentation <http://fcp-indi.github.com/docs/developer/workflows/basc.html>`_.

.. figure:: /_images/basc_manu_schematic.png

Note that clusters do not by themselves convey any quantitative information regarding stability. Based on a stability matrix, it is possible to construct a stability map for each cluster that will depict the stability of each voxel's membership to that cluster. This can be done at both the individual and group level.

Applications and Recommendations
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
BASC has recently been used to investigate differences in striatal connectivity patterns between children with ADHD and typically developing controls (Garcia-Garcia et al., 2012), and has been shown to have good test-retest reliability (Garcia-Garcia et al., in prep).

A number of parameters can influence the results of a BASC analysis, the most important of which is the number of clusters. Users are directed to Bellec et al. 2010 for an in-depth discussion of how each parameter influences calculation.

Configuring CPAC to Run BASC
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. figure:: /_images/basc_gui.png

#. **Run BASC - [Off, On]:** Run Bootstrap Analysis of Stable Clusters.

#. **Mask File - [path]:** Full path to a mask file to be used when running BASC. Voxels outside this mask will be excluded from analysis. If you do not wish to use a mask, set this field to None. However, BASC is very computationally intensive, we strongly recommend you limit your analysis to specific brain areas of interest.

#. **Number of Time Series Bootstraps - [integer]:** Number of bootstraps to apply to individual time series.

#. **Number of Dataset Bootstraps - [integer]:** Number of bootstraps to apply to the original dataset.

#. **Correlation Threshold File - [path]:** Path to a text file containing correlation threshold for each subject. These thresholds will be applied to the correlation matrix before clustering. This file should contain one value per line, with each line corresponding to the subject on the same line in the group analysis subject list file. In most cases, the same threshold can be used for all subjects. Different thresholds are useful when subjects have time series of different lengths.

#. **Number of Clusters - [integer]:** Number of clusters to create during clustering at both the individual and group levels.

Configuration Using a YAML File
""""""""""""""""""""""""""""""""

To configure BASC options within a YAML file, add the following lines to your file (with appropriate substitutions for paths)::

    runBASC : [0]
    bascROIFile : None
    bascTimeseriesBootstraps : 100
    bascDatasetBootstraps : 100
    bascAffinityThresholdFile : 
    bascClusters : 6

References
^^^^^^^^^^
Bellec, P. Rosa-Neto, O. C. Lyttelton, H. Benali, and A. C. Evans, `Multi-level bootstrap analysis of stable clusters in resting-state fMRI <http://www.ncbi.nlm.nih.gov/pubmed/20226257>`_., NeuroImage, vol. 51, no. 3, pp. 1126-39, Jul. 2010.

Manuel Garcia-Garcia, Brian Cheung, Adriana Di Martino, Pierre Bellec, Clare Kelly, F. Xavier Castellanos, Michael Milham. `Stability of Functional Connectivity networks in the Basal Ganglia in ADHD <http://ww4.aievolution.com/hbm1201/index.cfm?do=abs.viewAbs&abs=7010>`_. Poster. 2012.

Garcia-Garcia, M., Bellec, P., Craddock, C., Cheung, B., Zuo, X-N., Kelly, C., Di Martino, A., Castellanos, F.X., and Milham, M.P. Individual stability of resting-state functional units: a new reliable tool.
