help > List of connectivity strengths
Showing 1-5 of 5 posts
Display:
Results per page:
Jun 19, 2014  02:06 PM | Christopher Whelan - RCSI
List of connectivity strengths
Hi Andrew,

I had a quick question regarding the 'List of Connectivity Strengths for Single Connection' option on page 31 of the manual.

The command itself seems to be working ok, but on closer inspection, it gives me the same values regardless of the nodes I'm specifying.

For example, let's say I have five subjects and want to obtain connectivity strengths between Crus 1 of the cerebellum and the precentral gyrus. I type this command...

i=1; %Cerebelum_Crus1_L
j=2; %Fusiform_L
global nbs; N=nbs.STATS.N; ind_upper=find(triu(ones(N,N),1));
cross_ref=zeros(N,N); cross_ref(ind_upper)=1:length(ind_upper);
cross_ref=cross_ref+cross_ref'; ind=cross_ref(i,j);
fprintf('%0.2f\n',nbs.GLM.y(:,ind));

...and get this matrix of connectivity values:
0.00
0.56
0.54
0.00
0.56

That's fine. However, let's say I want to look at connection strengths between another set of nodes, e.g. Frontal_Inf_Orb_L and Fusiform_L. Test. I type the new command:

i=1; %Frontal_Inf_Orb_L
j=2; %Fusiform_L
global nbs; N=nbs.STATS.N; ind_upper=find(triu(ones(N,N),1));
cross_ref=zeros(N,N); cross_ref(ind_upper)=1:length(ind_upper);
cross_ref=cross_ref+cross_ref'; ind=cross_ref(i,j);
fprintf('%0.2f\n',nbs.GLM.y(:,ind));

...but receive the same set of values:
0.00
0.56
0.54
0.00
0.56

In fact, this same set of values appears regardless of what I enter in as 'i' or 'j'... even when I enter in unrelated nodes that weren't significant. 

I'm just wondering whether you could clarify if I'm overlooking something straightforward. Any input would be greatly appreciated!

Thanks for your great piece of software. 

Chris
Jun 20, 2014  06:06 AM | Andrew Zalesky
RE: List of connectivity strengths
Hi Chris,

From Matlab's point of view, there is no difference between this:

i=1; %Cerebelum_Crus1_L
j=2; %Fusiform_L

and this:

i=1; %Frontal_Inf_Orb_L
j=2; %Fusiform_L


You need to change the value of "i" and "j". Matlab doesn't consider the text that appears after the percent symbol. I have just typed that text so that it is clear that region i=1 corresponds to that particular region.

So you need to go to the list of AAL regions and look for the indexes of the two regions you are interested in. Say you are interested in regions with index 45 and 78  (e.g. Cuneus_L and Thalamus_R), then you would type:

i=45;
j=78;

Andrew



Originally posted by Christopher Whelan:
Hi Andrew,

I had a quick question regarding the 'List of Connectivity Strengths for Single Connection' option on page 31 of the manual.

The command itself seems to be working ok, but on closer inspection, it gives me the same values regardless of the nodes I'm specifying.

For example, let's say I have five subjects and want to obtain connectivity strengths between Crus 1 of the cerebellum and the precentral gyrus. I type this command...

i=1; %Cerebelum_Crus1_L
j=2; %Fusiform_L
global nbs; N=nbs.STATS.N; ind_upper=find(triu(ones(N,N),1));
cross_ref=zeros(N,N); cross_ref(ind_upper)=1:length(ind_upper);
cross_ref=cross_ref+cross_ref'; ind=cross_ref(i,j);
fprintf('%0.2f\n',nbs.GLM.y(:,ind));

...and get this matrix of connectivity values:
0.00
0.56
0.54
0.00
0.56

That's fine. However, let's say I want to look at connection strengths between another set of nodes, e.g. Frontal_Inf_Orb_L and Fusiform_L. Test. I type the new command:

i=1; %Frontal_Inf_Orb_L
j=2; %Fusiform_L
global nbs; N=nbs.STATS.N; ind_upper=find(triu(ones(N,N),1));
cross_ref=zeros(N,N); cross_ref(ind_upper)=1:length(ind_upper);
cross_ref=cross_ref+cross_ref'; ind=cross_ref(i,j);
fprintf('%0.2f\n',nbs.GLM.y(:,ind));

...but receive the same set of values:
0.00
0.56
0.54
0.00
0.56

In fact, this same set of values appears regardless of what I enter in as 'i' or 'j'... even when I enter in unrelated nodes that weren't significant. 

I'm just wondering whether you could clarify if I'm overlooking something straightforward. Any input would be greatly appreciated!

Thanks for your great piece of software. 

Chris
Jun 20, 2014  10:06 AM | Christopher Whelan - RCSI
RE: List of connectivity strengths
That makes perfect sense. Thank you so much, Andrew. I really appreciate the quick reply.

Best,
Chris
Feb 13, 2018  12:02 PM | gmcphilemy
RE: List of connectivity strengths
Hi Andrew,

Is there a way to implement the 'List of Connectivity Strengths for Single Connection' to get the list of connectivity strengths for all connections in a significant network rather than just a single connection? I tried to build a for loop for this but I can't get it working. 

Thank you for the help!

Genevieve
Feb 14, 2018  12:02 AM | Andrew Zalesky
RE: List of connectivity strengths
Hi Genevieve,

This can be achieved with a for-loop.

Here is how to do it. Note that I have not tested this but it should work:

global nbs; N=nbs.STATS.N;

ind_upper=find(triu(ones(N,N),1));
cross_ref=zeros(N,N);
cross_ref(ind_upper)=1:length(ind_upper);
cross_ref=cross_ref+cross_ref';

[i,j]=find(nbs.NBS.con_mat{1});
for n=1:length(i)
     ind=cross_ref(i(n),j(n));
     fprintf('%0.3f\n',nbs.GLM.y(:,ind));
end


Originally posted by gmcphilemy:
Hi Andrew,

Is there a way to implement the 'List of Connectivity Strengths for Single Connection' to get the list of connectivity strengths for all connections in a significant network rather than just a single connection? I tried to build a for loop for this but I can't get it working. 

Thank you for the help!

Genevieve