Seed Based Correlation Analysis

CPAC.sca.create_sca(name_sca='sca')[source]

Map of the correlations of the Region of Interest(Seed in native or MNI space) with the rest of brain voxels. The map is normalized to contain Z-scores, mapped in standard space and treated with spatial smoothing.

name_sca : a string
Name of the SCA workflow

sca_workflow : workflow

Seed Based Correlation Analysis Workflow

Source

Workflow Inputs:

inputspec.rest_res_filt : string (existing nifti file)
    Band passed Image with Global Signal , white matter, csf and motion regression. Recommended bandpass filter (0.001,0.1) )

inputspec.timeseries_one_d : string (existing nifti file)
    1D 3dTcorr1D compatible timeseries file. 1D file can be timeseries from a mask or from a parcellation containing ROIs

Workflow Outputs:

outputspec.correlation_file : string (nifti file)
    Correlations of the functional file and the input time series 

outputspec.Z_score : string (nifti file)
    Fisher Z transformed correlations of the seed 

SCA Workflow Procedure:

  1. Compute pearson correlation between input timeseries 1D file and input functional file Use 3dTcorr1D to compute that. Input timeseries can be a 1D file containing parcellation ROI’s or a 3D mask
  2. Compute Fisher Z score of the correlation computed in step above. If a mask is provided then a a single Z score file is returned, otherwise z-scores for all ROIs are returned as a list of nifti files

Workflow:

workflows/../images/sca_graph.dot.png

Detailed Workflow:

workflows/../images/sca_detailed_graph.dot.png
>>> sca_w = create_sca("sca_wf")
>>> sca_w.inputs.inputspec.functional_file = '/home/data/subject/func/rest_bandpassed.nii.gz'
>>> sca_w.inputs.inputspec.timeseries_one_d = '/home/data/subject/func/ts.1D' 
>>> sca_w.run() 
CPAC.sca.compute_fisher_z_score(correlation_file, timeseries_one_d)[source]

Computes the fisher z transform of the input correlation map If the correlation map contains data for multiple ROIs then the function returns z score for each ROI as a seperate nifti file

correlation_file: string
Input correlations file
out_file : list (nifti files)
list of z_scores for mask or ROI
CPAC.sca.create_temporal_reg(wflow_name='temporal_reg', which='SR')[source]

Temporal multiple regression workflow Provides a spatial map of parameter estimates corresponding to each provided timeseries in a timeseries.txt file as regressors

wflow_name : a string
Name of the temporal regression workflow
which: a string

SR: Spatial Regression, RT: ROI Timeseries

NOTE: If you set (which = ‘RT’), the output of this workflow will be renamed based on the header information provided in the timeseries.txt file. If you run the temporal regression workflow manually, don’t set (which = ‘RT’) unless you provide a timeseries.txt file with a header containing the names of the timeseries.

wflow : workflow

temporal multiple regression Workflow

Source

Workflow Inputs:

inputspec.subject_rest : string (existing nifti file)
    Band passed Image with Global Signal , white matter, csf and motion regression. Recommended bandpass filter (0.001,0.1) )

inputspec.subject_timeseries : string (existing txt file)
    text file containing the timeseries to be regressed on the subjects
    functional file 
    timeseries are organized by columns, timepoints by rows

inputspec.subject_mask : string (existing nifti file)
    path to subject functional mask
    
inputspec.demean : Boolean
    control whether to demean model and data
    
inputspec.normalize : Boolean
    control whether to normalize the input timeseries to unit standard deviation

Workflow Outputs:

outputspec.temp_reg_map : string (nifti file)
    GLM parameter estimate image for each timeseries in the input file

outputspec.temp_reg_map_zstat : string (nifti file)
    Normalized version of the GLM parameter estimates

Temporal Regression Workflow Procedure:

Enter all timeseries into a general linear model and regress these timeseries to the subjects functional file to get spatial maps of voxels showing activation patterns related to those in the timeseries.

Workflow:

workflows/../images/create_temporal_regression.png

Detailed Workflow:

workflows/../images/detailed_graph_create_temporal_regression.png

http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/DualRegression/UserGuide

>>> tr_wf = create_temporal_reg('temporal regression')
>>> tr_wf.inputs.inputspec.subject_rest = '/home/data/subject/func/rest_bandpassed.nii.gz'
>>> tr_wf.inputs.inputspec.subject_timeseries = '/home/data/subject/func/timeseries.txt'
>>> tr_wf.inputs.inputspec.subject_mask = '/home/data/spatialmaps/spatial_map.nii.gz'
>>> tr_wf.inputs.inputspec.demean = True
>>> tr_wf.inputs.inputspec.normalize = True
>>> tr_wf.run() 
CPAC.sca.map_to_roi(timeseries, maps)[source]

Renames the outputs of the temporal multiple regression workflow for sca according to the header information of the timeseries.txt file that was passed

NOTE: This is only run if the temporal regression is run as part of sca
(which = ‘RT’) when calling the temporal regression workflow. If you run the temporal regression workflow manually, don’t set (which = ‘RT’) unless you provide a timeseries.txt file with a header containing the names of the timeseries
timeseries: string
Input timeseries.txt file
maps: List (nifti files)
List of output files generated by the temporal regression workflow if (which == ‘RT’)
labels : List (strings)
List of names that the output files should be renamed to
maps: List (nifti files)
List of output files generated by the temporal regression workflow if (which == ‘RT’)