Dynamic brain connectome analysis toolbox

Dynamic brain connectome (DynamicBC) analysis toolbox is a Matlab toolbox to calculate Dynamic Functional Connectivity (d-FC) and Dynamic Effective Connectivity (d-EC). Sliding window analysis (Bivariate Pearson correlation and Granger causality) and time varying parameter regression method (Flexible Least Squares) are two dynamic analysis strategies for time-variant connectivity analysis in the DynamicBC. Granger causality density/strength (GCD/GCS) and functional connectivity density/strength (FCD/FCS) analysis would be performed in this toolbox. Add DynamicBC's directory to MATLAB's path and enter "DynamicBC" in the command window of MATLAB to enjoy it.

The latest release is DynamicBC2.2_20181112

Manual could also be downloaded here

New features of DynamicBC 2.0 release 20180311:
New features of DynamicBC2.2 release 20181112:
--Added a visualization module for connectogram.
--Added a demo for visualization a connectogram.
--Added new feature for cluster number estimation.
--Fixed a bug for clustering the ALFF maps.


New features of DynamicBC 2.0 release 20180311:
   --Fixed minor bugs in the Clustering module.

New features of DynamicBC 2.0 release 20171228:
1. Changed the toolbox cover.
2. Added the new module for dynamic intrinsic brain activity (dynamic ALFF).  


New features of DynamicBC 1.2 release 20160415

Fixed the step bugs when selecting window size.


New features of DynamicBC 1.1 release 20140710:
1. Added the new utilties including the ‘Clustering’ and 'Spectrum' for dynamic FC/EC time series.
2. Added the new output of variance of dynamic FC/EC time series.  

New features of DynamicBC 1.0 release 20140429
This release fixed some minor bugs in dynamic FCD.

Package icon DynamicBC2.2_20181112.zip5.43 MB


I'm interested to use the toolbox, but I do not know how to generate the plots that you show in your Manual (e.g., on page 51).  Could you please tell me how to do it? 

Matthew Hoptman

Dynamic EC模块
采用 Slide Window 模式

出错信息如下 ,请求指教,多谢!

Now DynamicBC is running on 0 workers.
Running now!
Default mode: fMRI(reading from NIFTI image), if not? choose "Set ROI/ ROI wise"
Default value 0/NaN is not in the mask/label!
Default value>0 is inside the mask!
There are 104388 voxels inside the mask
Running subject    1 (all    8 subjects)
Subscripted assignment dimension mismatch.

Error in DynamicBC_sliding_window_GC (line 87)
                Matrix(GCM.indX{i},:) =  GCM.matrix{i,1};

Error in DynamicBC_run (line 265)
Error in DynamicBC>wgr_run_check (line 1126)
Error while evaluating uicontrol Callback

 data directory输入文件夹为E:\analysis\FunImgARCWSDF,run的时候报错:

??? Error using ==> matlabpool

Too many output arguments.
Error in ==> DynamicBC>wgr_run_all at 944

mps = matlabpool('size');
??? Error while evaluating uicontrol Callback


A new feature "clustering" was added into the new vertion of "DynamicBC" tool, but what's the processes (principle) in your "clustering". In addtion, by your tool, can I obtain the "dwell time" in each state that is regared as the number of windows belonging to the special state related cluster? and the "transition times (numbers) between states"? how can I display these results in the matlab. thanks!

The cluster analysis in DynamicBC toolbox was a prelimeinary attempt, and it would be not well advised. Thank you for your good question. The principle of k-means is very simple. We just reshape the data into 2-dimension matrix (voxel/roi * time-window) and concatenate it subject by subject. Then we use kmean function in Matlab to generate k clusters in group level. After that, we use kmean to generate k clusters in every subject. Pearson correlation is used to re-order every subject's k clusters to match the order of group level. Well, the labels of every time-window map/matrix or the "dwell time" has been generated in the function of kmean. Unfortunately, we didn't save it out in the function. You could add this line of code, 'save([outputd,'mat_',CluMet,'_Kmeans_',num2str(k),'_Order.mat'],'IDX_all','IDX_subj','IDX_subjre');', to the end of the function "dynamicBC_clustermatrix_beta.m"/"dynamicBC_clustermaps_beta.m". The variable IDX_all would give us the distribution of k clusters in the whole maps/matrices. The variable IDX_subj is a 2-dimension matrix (subj num * time-window) The variable IDX_subjre is a 2-dimension matrix (subj num * time-window), which represents the re-ordered lables sorted according the group level by using the pearson correlation. The new version would come soon and it would fix the problem. Hope it could help you. If you have other questions or good ideas, please contract us. It would help us to make the toolbox better.

Could we use Dynamic brain connectome analysis toolbox to analyze the data and publish SCI paper, Since you said "The cluster analysis in DynamicBC toolbox was a prelimeinary attempt, and it would be not well advised". When will you update the version of this toolbox? 

DyanmicBC 项目组的各位老师:
您好,我在用DyanmicBC 2.0的时候,程序报错信息如下(Linux,Matlab2013a,DyanmicBC 2.0)
Error using  -
Too many input arguments.

Error in DynamicBC_run (line 99)
    if any(v0(1).dim-vm.dim)

Error in DynamicBC>wgr_run_check (line 1067)

Error while evaluating uicontrol Callbackd










When I use the toolbox to calculate FCD, the outcomes contains 4 Maps(Positive only/Absolute & Weight/Binary). What do these files mean? I used GRETNA before, it came out with short FCD and long FCD. What are the differences between DynamicBC and GRETNA? Thank you very much!


您好,想请教一下使用DyanmicBC计算聚类分析时,是只能用FLS的结果文件进行吗?还是滑动窗的结果文件也可以 呢?如果都可以,可以辛苦告知一下结果文件具体使用哪个吗?感谢您的答复!