Skip to content

Commit

Permalink
AIDAconnect v1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lscharwaechter committed Apr 23, 2021
1 parent c9767a7 commit 48f0405
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 3 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified AIDAconnect_Manual.pdf
Binary file not shown.
Binary file modified DTI/.DS_Store
Binary file not shown.
7 changes: 7 additions & 0 deletions DTI/GraphEval/getMergedDTI_data.m
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ function getMergedDTI_data(dtiStruct,thres)
clustercoef = zeros(length(matFile_cur),numOfRegions);
clustercoef_rand = zeros(length(matFile_cur),numOfRegions);
clustercoef_normalized = zeros(length(matFile_cur),numOfRegions);
participationcoef = zeros(length(matFile_cur),numOfRegions);
degrees = zeros(length(matFile_cur),numOfRegions);
strengths = zeros(length(matFile_cur),numOfRegions);
betweenness = zeros(length(matFile_cur),numOfRegions);
Expand Down Expand Up @@ -95,6 +96,11 @@ function getMergedDTI_data(dtiStruct,thres)
% Local parameters for each region using graph theory (BCT)
clustercoef(i,:) = clustering_coef_wu(current_mat_normalized);
clustercoef_rand(i,:) = clustering_coef_wu(randomNetwork);
[communityAffiliationVector,~] = community_louvain(current_mat,1);
% The community affiliation vector assigns nodes to specific,
% non-overlapping modules and is a necessary parameter for the
% participation coefficient
participationcoef(i,:) = participation_coef(current_mat,communityAffiliationVector,0);
degrees(i,:) = degrees_und(current_mat)';
strengths(i,:)= strengths_und(current_mat)';
betweenness(i,:) = betweenness_wei(current_mat_inverse);
Expand Down Expand Up @@ -142,6 +148,7 @@ function getMergedDTI_data(dtiStruct,thres)
infoDTI.matrix = coMat;
infoDTI.labels = labels;
infoDTI.clustercoef = clustercoef;
infoDTI.participationcoef = participationcoef;
infoDTI.degrees = degrees;
infoDTI.strengths = strengths;
infoDTI.betw_centrality = betweenness;
Expand Down
1 change: 1 addition & 0 deletions DTI/GraphEval/graphAnalysis_DTI.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
G.Nodes.allEigenvector(:,mIdx) = tempFile.infoDTI.eign_centrality(mIdx,:);
G.Nodes.allBetweenness(:,mIdx) = tempFile.infoDTI.betw_centrality(mIdx,:);
G.Nodes.allClustercoef(:,mIdx) = tempFile.infoDTI.clustercoef(mIdx,:);
G.Nodes.allParticipationcoef(:,mIdx) = tempFile.infoDTI.participationcoef(mIdx,:);
G.Nodes.allEfficiency(:,mIdx) = tempFile.infoDTI.localEfficiency(mIdx,:);
G.Nodes.FA0(:,mIdx) = tempFile.infoDTI.FA0(mIdx,:);
G.Nodes.AD(:,mIdx) = tempFile.infoDTI.AD(mIdx,:);
Expand Down
7 changes: 6 additions & 1 deletion DTI/plotLocalParameter.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ function plotLocalParameter(inputDTI, graphCell, strNodeName, strParameter)
% inputDTI and graphCell from mergeDTIdata_input.m
% strNodeName = Region to examine (as String)
% strParameter = 'Degree', 'Eigenvector', 'Betweenness', 'Strength',
% 'Clustercoefficient', 'Efficiency',
% 'Clustercoefficient', 'Participationcoefficient',
% 'Efficiency',
% 'FA0', 'AD', 'MD', 'RD'

%% Example
Expand Down Expand Up @@ -39,6 +40,8 @@ function plotLocalParameter(inputDTI, graphCell, strNodeName, strParameter)
valuesGroup1(animal,dIdx) = graphCell{1,dIdx}.Nodes.allBetweenness(b,animal);
case 'clustercoefficient'
valuesGroup1(animal,dIdx) = graphCell{1,dIdx}.Nodes.allClustercoef(b,animal);
case 'participationcoefficient'
valuesGroup1(animal,dIdx) = graphCell{1,dIdx}.Nodes.allParticipationcoef(b,animal);
case 'efficiency'
valuesGroup1(animal,dIdx) = graphCell{1,dIdx}.Nodes.allEfficiency(b,animal);
case 'fa0'
Expand Down Expand Up @@ -79,6 +82,8 @@ function plotLocalParameter(inputDTI, graphCell, strNodeName, strParameter)
valuesGroup2(animal,dIdx) = graphCell{2,dIdx}.Nodes.allBetweenness(b,animal);
case 'clustercoefficient'
valuesGroup2(animal,dIdx) = graphCell{2,dIdx}.Nodes.allClustercoef(b,animal);
case 'participationcoefficient'
valuesGroup2(animal,dIdx) = graphCell{2,dIdx}.Nodes.allParticipationcoef(b,animal);
case 'efficiency'
valuesGroup2(animal,dIdx) = graphCell{2,dIdx}.Nodes.allEfficiency(b,animal);
case 'fa0'
Expand Down
Binary file modified fMRI/.DS_Store
Binary file not shown.
7 changes: 6 additions & 1 deletion fMRI/plotLocalParameter.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ function plotLocalParameter(inputFMRI, graphCell, strNodeName, strParameter)
% inputFMRI and graphCell from mergeFMRIdata_input.m
% strNodeName = Region to examine (as String)
% strParameter = 'Degree', 'Eigenvector', 'Betweenness', 'Strength',
% 'Clustercoefficient', 'Efficiency'
% 'Clustercoefficient', 'Participationcoefficient',
% 'Efficiency'

%% Example
% plotLocalParameter(inputFMRI, graphCell, 'L SSp-ul', 'Degree')
Expand Down Expand Up @@ -38,6 +39,8 @@ function plotLocalParameter(inputFMRI, graphCell, strNodeName, strParameter)
valuesGroup1(animal,dIdx) = graphCell{1,dIdx}.Nodes.allBetweenness(b,animal);
case 'clustercoefficient'
valuesGroup1(animal,dIdx) = graphCell{1,dIdx}.Nodes.allClustercoef(b,animal);
case 'participationcoefficient'
valuesGroup1(animal,dIdx) = graphCell{1,dIdx}.Nodes.allParticipationcoef(b,animal);
case 'efficiency'
valuesGroup1(animal,dIdx) = graphCell{1,dIdx}.Nodes.allEfficiency(b,animal);
otherwise
Expand Down Expand Up @@ -70,6 +73,8 @@ function plotLocalParameter(inputFMRI, graphCell, strNodeName, strParameter)
valuesGroup2(animal,dIdx) = graphCell{2,dIdx}.Nodes.allBetweenness(b,animal);
case 'clustercoefficient'
valuesGroup2(animal,dIdx) = graphCell{2,dIdx}.Nodes.allClustercoef(b,animal);
case 'participationcoefficient'
valuesGroup2(animal,dIdx) = graphCell{2,dIdx}.Nodes.allParticipationcoef(b,animal);
case 'efficiency'
valuesGroup2(animal,dIdx) = graphCell{2,dIdx}.Nodes.allEfficiency(b,animal);
otherwise
Expand Down
10 changes: 9 additions & 1 deletion fMRI/rsfMRI_Processing/getMergedFMRI_data.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@ function getMergedFMRI_data(fmriStruct,thres)
% All subsequent positions should contain the number of atlas
% labels, which should always result in the same number.
% If not, then line 36 will cause an error because the numOfRegions
% is not unique anymore.
% is not unique anymore. A quick solution is then to specify
% a concrete number in line 29 for numOfRegions, e.g. 98.
infoFMRI = struct();
coMat = zeros(numOfRegions,numOfRegions,length(matFile_cur));
namesOfMat = cell(length(matFile_cur),1);
clustercoef = zeros(length(matFile_cur),numOfRegions);
clustercoef_rand = zeros(length(matFile_cur),numOfRegions);
clustercoef_normalized = zeros(length(matFile_cur),numOfRegions);
participationcoef = zeros(length(matFile_cur),numOfRegions);
degrees = zeros(length(matFile_cur),numOfRegions);
strengths = zeros(length(matFile_cur),numOfRegions);
betweenness = zeros(length(matFile_cur),numOfRegions);
Expand Down Expand Up @@ -91,6 +93,11 @@ function getMergedFMRI_data(fmriStruct,thres)
% Local parameters for each region using graph theory (BCT)
clustercoef(i,:) = clustering_coef_wu(current_mat);
clustercoef_rand(i,:) = clustering_coef_wu(randomNetwork);
[communityAffiliationVector,~] = community_louvain(current_mat,1);
% The community affiliation vector assigns nodes to specific,
% non-overlapping modules and is a necessary parameter for the
% participation coefficient
participationcoef(i,:) = participation_coef(current_mat,communityAffiliationVector,0);
degrees(i,:) = degrees_und(current_mat)';
strengths(i,:) = strengths_und(current_mat)';
betweenness(i,:) = betweenness_wei(current_mat_inverse);
Expand Down Expand Up @@ -120,6 +127,7 @@ function getMergedFMRI_data(fmriStruct,thres)
infoFMRI.matrix = current_matAll;
infoFMRI.labels = labels;
infoFMRI.clustercoef = clustercoef;
infoFMRI.participationcoef = participationcoef;
infoFMRI.degrees = degrees;
infoFMRI.strengths = strengths;
infoFMRI.betw_centrality = betweenness;
Expand Down
1 change: 1 addition & 0 deletions fMRI/rsfMRI_Processing/graphAnalysis_fMRI.m
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
G.Nodes.allEigenvector(:,mIdx) = tempFile.infoFMRI.eign_centrality(mIdx,:);
G.Nodes.allBetweenness(:,mIdx) = tempFile.infoFMRI.betw_centrality(mIdx,:);
G.Nodes.allClustercoef(:,mIdx) = tempFile.infoFMRI.clustercoef(mIdx,:);
G.Nodes.allParticipationcoef(:,mIdx) = tempFile.infoFMRI.participationcoef(mIdx,:);
G.Nodes.allEfficiency(:,mIdx) = tempFile.infoFMRI.localEfficiency(mIdx,:);
end
graphCell{gIdx,dIdx} = G;
Expand Down

0 comments on commit 48f0405

Please sign in to comment.