Commit 24a31174 authored by peter.mccolgan's avatar peter.mccolgan
Browse files

Initial commit

parents
%plot layers
clear all
close all
% Load 7T data
load('./figure_3/R1_ROI_vis')
load('./figure_3/R1_ROI_mot')
load('./figure_3/R1_ROI_aud')
load('./figure_3/R1_ROI_SP')
depth_idx = 8;
ROI_vis = {'V1' 'V2' 'V3' 'V4' 'V6' 'MT'};
ROI_mot = {'1' '2' '3A' '4' '3B'};
ROI_aud = {'A1' 'RI' 'PBelt' 'MBelt' 'LBelt'};
ROI_SP = {'7PL' 'LIPv' 'IP1' 'MIP' 'LIPd' };
% Plot visual ROIs
figure('DefaultAxesFontSize',18)
for i = 1:6
x = 1:depth_idx;
y = mean(R1_ROI_vis(:,i,:),3);
neg = reshape((std(R1_ROI_vis(:,i,:),0,3))./sqrt(size(R1_ROI_vis,3)),8,1);
pos = reshape((std(R1_ROI_vis(:,i,:),0,3))./sqrt(size(R1_ROI_vis,3)),8,1);
errorbar(x,y,neg,pos,'Linewidth',1.5)
hold on
end
legend(ROI_vis,'Location','northwest')
xlabel('Cortical depth ( Pial -> GM/WM boundary)')
ylabel('R1')
figure('DefaultAxesFontSize',18)
% % %Plot motor ROIs
for i = 1:5
x = 1:depth_idx;
y = mean(R1_ROI_mot(:,i,:),3);
neg = reshape((std(R1_ROI_mot(:,i,:),0,3))./sqrt(size(R1_ROI_mot,3)),8,1);
pos = reshape((std(R1_ROI_mot(:,i,:),0,3))./sqrt(size(R1_ROI_mot,3)),8,1);
errorbar(x,y,neg,pos,'Linewidth',1.5)
hold on
end
legend(ROI_mot,'Location','northwest')
xlabel('Cortical depth ( Pial -> GM/WM boundary)')
ylabel('R1')
figure('DefaultAxesFontSize',18)
% % %Plot auditory ROIs
for i = 1:5
x = 1:depth_idx;
y = mean(R1_ROI_aud(:,i,:),3);
neg = reshape((std(R1_ROI_aud(:,i,:),0,3))./sqrt(size(R1_ROI_aud,3)),8,1);
pos = reshape((std(R1_ROI_aud(:,i,:),0,3))./sqrt(size(R1_ROI_aud,3)),8,1);
errorbar(x,y,neg,pos,'Linewidth',1.5)
hold on
end
legend(ROI_aud,'Location','northwest')
xlabel('Cortical depth ( Pial -> GM/WM boundary)')
ylabel('R1')
figure('DefaultAxesFontSize',18)
% % %Plot superior parietal ROIs
for i = 1:5
x = 1:depth_idx;
y = mean(R1_ROI_SP(:,i,:),3);
neg = reshape((std(R1_ROI_SP(:,i,:),0,3))./sqrt(size(R1_ROI_SP,3)),8,1);
pos = reshape((std(R1_ROI_SP(:,i,:),0,3))./sqrt(size(R1_ROI_SP,3)),8,1);
errorbar(x,y,neg,pos,'Linewidth',1.5)
hold on
end
legend(ROI_SP,'Location','northwest')
xlabel('Cortical depth ( Pial -> GM/WM boundary)')
ylabel('R1')
%plot layers
clear all
close all
% Load 7T data
load('./figure_3/R2s_ROI_vis')
load('./figure_3/R2s_ROI_mot')
load('./figure_3/R2s_ROI_aud')
load('./figure_3/R2s_ROI_SP')
depth_idx = 8;
ROI_vis = {'V1' 'V2' 'V3' 'V4' 'V6' 'MT'};
ROI_mot = {'1' '2' '3A' '4' '3B'};
ROI_aud = {'A1' 'RI' 'PBelt' 'MBelt' 'LBelt'};
ROI_SP = {'7PL' 'LIPv' 'IP1' 'MIP' 'LIPd' };
% Plot visual ROIs
figure('DefaultAxesFontSize',18)
for i = 1:6
x = 1:depth_idx;
y = mean(R2s_ROI_vis(:,i,:),3);
neg = reshape((std(R2s_ROI_vis(:,i,:),0,3))./sqrt(size(R2s_ROI_vis,3)),8,1);
pos = reshape((std(R2s_ROI_vis(:,i,:),0,3))./sqrt(size(R2s_ROI_vis,3)),8,1);
errorbar(x,y,neg,pos,'Linewidth',1.5)
hold on
end
legend(ROI_vis,'Location','northwest')
xlabel('Cortical depth ( Pial -> GM/WM boundary)')
ylabel('R2s')
figure('DefaultAxesFontSize',18)
% % %Plot motor ROIs
for i = 1:5
x = 1:depth_idx;
y = mean(R2s_ROI_mot(:,i,:),3);
neg = reshape((std(R2s_ROI_mot(:,i,:),0,3))./sqrt(size(R2s_ROI_mot,3)),8,1);
pos = reshape((std(R2s_ROI_mot(:,i,:),0,3))./sqrt(size(R2s_ROI_mot,3)),8,1);
errorbar(x,y,neg,pos,'Linewidth',1.5)
hold on
end
legend(ROI_mot,'Location','northwest')
xlabel('Cortical depth ( Pial -> GM/WM boundary)')
ylabel('R2s')
figure('DefaultAxesFontSize',18)
% % %Plot auditory ROIs
for i = 1:5
x = 1:depth_idx;
y = mean(R2s_ROI_aud(:,i,:),3);
neg = reshape((std(R2s_ROI_aud(:,i,:),0,3))./sqrt(size(R2s_ROI_aud,3)),8,1);
pos = reshape((std(R2s_ROI_aud(:,i,:),0,3))./sqrt(size(R2s_ROI_aud,3)),8,1);
errorbar(x,y,neg,pos,'Linewidth',1.5)
hold on
end
legend(ROI_aud,'Location','northwest')
xlabel('Cortical depth ( Pial -> GM/WM boundary)')
ylabel('R2s')
figure('DefaultAxesFontSize',18)
% % %Plot superior parietal ROIs
for i = 1:5
x = 1:depth_idx;
y = mean(R2s_ROI_SP(:,i,:),3);
neg = reshape((std(R2s_ROI_SP(:,i,:),0,3))./sqrt(size(R2s_ROI_SP,3)),8,1);
pos = reshape((std(R2s_ROI_SP(:,i,:),0,3))./sqrt(size(R2s_ROI_SP,3)),8,1);
errorbar(x,y,neg,pos,'Linewidth',1.5)
hold on
end
legend(ROI_SP,'Location','northwest')
xlabel('Cortical depth ( Pial -> GM/WM boundary)')
ylabel('R2s')
% %04/12/18 P McColgan
clear all
% close all
signif_flag = 0;
%load data
load('../source_data/figure_S2/R1_VE_av')
load('../source_data/figure_S2/R1_VE_layer')
load('../source_data/figure_S2/tot_cellcount')
load('../source_data/figure_S2/cellcount')
% Total cell count vs. average R1 per ROI
figure('DefaultAxesFontSize',18)
%[R_VE,P_VE] = corr([tot_cellcount R1_VE_av],'rows','pairwise');
[R_VE,P_VE,RLO_VE,RUP_VE] = corrcoef(tot_cellcount, R1_VE_av, 'alpha', 0.05);
plot(tot_cellcount,R1_VE_av, 'o', 'MarkerFaceColor', 'b','MarkerSize',10);
h = lsline;
h.LineWidth = 4;
set(h(1),'color','r')
xlabel('VE cell count','FontSize',18,'FontWeight','bold')
ylabel('Av. R1','FontSize',18,'FontWeight','bold')
print('./figures/S2_R1_A_BB','-dpng','-r600');
%cell count vs. average R1 per ROI per layer
[R_R1,P_R1] = corr([R1_VE_layer cellcount'],'rows','pairwise');
Rmax_R1 = R_R1(1:8,9:14);
Pmax_R1 = P_R1(1:8,9:14);
if signif_flag
[r,c] = find((Pmax_R1>(0.05/(8*6))));
for x = 1:length(r)
Rmax_R1(r(x),c(x)) = 0;
end
end
figure('DefaultAxesFontSize',20)
imR1_VE = imagesc(Rmax_R1); % cell content
R1_layer_tot_cellcount = Rmax_R1;
xticks(1:6)
title('R1 and VE cell counts','FontSize',24,'FontWeight','bold')
xlabel('VE layer','FontSize',20,'FontWeight','bold')
ylabel('R1 cortical depth (WM/GM <- Pial)','FontSize',20,'FontWeight','bold')
xticklabels({'I','II','III','IV','V','VI'})
yticks(1:8)
yticklabels({'D1','D2','D3','D4','D5','D6','D7','D8'})
colorbar
caxis([-.8 .8])
print('./figures/S2_R1_B_VE','-dpng','-r600');
% %04/12/18 P McColgan
clear all
% close all
signif_flag = 0;
% % Load data
load('../source_data/figure_5/R2s_VE_av')
load('../source_data/figure_5/R2s_VE_layer')
load('../source_data/figure_5/tot_cellcount')
load('../source_data/figure_5/cellcount')
% Total cell count vs. average R2* per ROI
% figure('DefaultAxesFontSize',18)
% %[R_VE,P_VE] = corr([tot_cellcount R2s_VE_av],'rows','pairwise');
% [R_VE,P_VE,RLO_VE,RUP_VE]= corrcoef(tot_cellcount, R2s_VE_av, 'alpha', 0.05,'rows','pairwise');
% plot(tot_cellcount,R2s_VE_av, 'o', 'MarkerFaceColor', 'b','MarkerSize',10);
% h = lsline;
% h.LineWidth = 4;
% set(h(1),'color','r')
% xlabel('VE cell count','FontSize',18,'FontWeight','bold')
% ylabel('Av. R2*','FontSize',18,'FontWeight','bold')
% 95% confidence intervals
% VE_LU_CI = [RLO_VE(2,1) RUP_VE(2,1)];
% Total cell count vs. R2* per layer per ROI
[R_R2s,P_R2s] = corr([R2s_VE_layer cellcount'],'rows','pairwise');
Rmax_R2s = R_R2s(1:8,9:14);
Pmax_R2s = P_R2s(1:8,9:14);
if signif_flag
[r,c] = find((Pmax_R2s>(0.05/(8*6))));
for x = 1:length(r)
Rmax_R2s(r(x),c(x)) = 0;
end
end
figure('DefaultAxesFontSize',20)
imR2s_VE = imagesc(Rmax_R2s); % cell content
R2s_layer_tot_cellcount = Rmax_R2s;
xticks(1:6)
title('R2* and VE cell counts','FontSize',24,'FontWeight','bold')
xlabel('VE layer','FontSize',20,'FontWeight','bold')
ylabel('R2* cortical depth (WM/GM <- Pial)','FontSize',20,'FontWeight','bold')
xticklabels({'I','II','III','IV','V','VI'})
yticks(1:8)
yticklabels({'D1','D2','D3','D4','D5','D6','D7','D8'})
%colormap inferno
colorbar
caxis([-.8 .8])
print('./figures/5C','-dpng','-r600');
% Candidiate Gene analysis
clear all
close all
subj = 29;
ROI = 180;
%Load data
load('./figure_6/gene_name')
load('./figure_6/cand_gene')
load('./figure_6/gene_data_nonan_zscore')
load('./figure_6/R2sroi')
load('./figure_6/R1roi')
m.source_gene_data_nonan_zscore = gene_data_nonan_zscore;
m.source_gene_name = gene_name;
%Candidate gene correlation
%cand_gene = {'GRIN2B' 'SNCA' 'APOE' 'MAPT' 'RRM2B' 'VAMP1' 'KCNA1' 'ATP2B2' 'ADAM23'};
cand_gene = {'HTT' 'FAN1' 'RRM2B' 'PMS2' 'MLH1' 'RASGRP1' 'OLFM1' 'TPPP' 'CHGB' 'GABRD' 'ITGB4' 'KCNA1' 'NEFM' 'ATP1A1' 'ATP2A2' 'ATP2B2' 'PAK1' 'GLRX2' 'NRN1' 'IL17RB' 'PRMT8' 'NRIP3' 'SNAP25' 'VAMP1' 'UXS1' 'TSPYL5' 'ADAM23' 'DCLK1' 'DLGAP1'};
for i = 1:length(cand_gene)
str0 = [cand_gene{i}];
str1 = ['R1_' str0];
str2 = ['R1_' str0];
str3 = ['R2s_' str0];
str4 = ['R2s_' str0];
cand_gene_data = m.source_gene_data_nonan_zscore(:,(find(ismember(m.source_gene_name,(str0)))));
%%%%%%%%%%%%%% R2* %%%%%%%%%%%%%%
[rho_R2,pval_R2] = corr([cand_gene_data R2sroi'],'rows','pairwise');
rho_tot_R2(i) = rho_R2(2,1);
pval_tot_R2(i) = pval_R2(2,1);
%%%%%%%%%%%% R1 %%%%%%%%%%%%%%%%%%%%
[rho_R1,pval_R1] = corr([cand_gene_data R1roi'],'rows','pairwise');
rho_tot_R1(i) = rho_R1(2,1);
pval_tot_R1(i) = pval_R1(2,1);
end
%%%%%%%%%% FDR correction %%%%%%%%%%%%
R2_pval_fdr = mafdr(pval_tot_R2,'BHFDR','true');
R1_pval_fdr = mafdr(pval_tot_R1,'BHFDR','true');
%%%%%%%%%%%%% Create table %%%%%%%%%%%%%%%%%%
data = table;
data.names = cand_gene';
data.R2_rho = rho_tot_R2';
data.R2_pval = pval_tot_R2';
data.R2_pval_fdr = R2_pval_fdr';
data.R1_rho = rho_tot_R1';
data.R1_pval = pval_tot_R1';
data.R1_pval_fdr = R1_pval_fdr';
% write table
%writetable(data,'supplemental_table_1.xlsx')
% Script for PCA gene analysis
% P McColgan 07.12.18
% MPI-CBS
clear all
signif_flag = 1;
%Load data
load('./figure_6/target_gene')
load('./figure_6/gene_name')
load('./figure_6/gene_data_nonan_zscore')
load('./figure_6/R2s_av')
load('./figure_6/target_gene_name_type_2')
load('./figure_6/target_gene_name_type_3')
load('./figure_6/target_gene_name_type_4')
load('./figure_6/target_gene_name_type_5')
load('./figure_6/target_gene_name_type_6')
m.source_gene_name = gene_name;
m.source_gene_data_nonan_zscore = gene_data_nonan_zscore;
m.target_gene_name_type_2 = target_gene_name_type_2;
m.target_gene_name_type_3 = target_gene_name_type_3;
m.target_gene_name_type_4 = target_gene_name_type_4;
m.target_gene_name_type_5 = target_gene_name_type_5;
m.target_gene_name_type_6 = target_gene_name_type_6;
m.R2s_av = R2s_av;
% Match data type 2 (lamina 2 genes)
m.match_idx_type_2 = find(ismember(m.source_gene_name,m.target_gene_name_type_2)); % index refers to Allen data index
m.match_data_type_2 = m.source_gene_data_nonan_zscore(:,m.match_idx_type_2);
% Match data type 3 (lamina 3 genes)
m.match_idx_type_3 = find(ismember(m.source_gene_name,m.target_gene_name_type_3)); % index refers to Allen data index
m.match_data_type_3 = m.source_gene_data_nonan_zscore(:,m.match_idx_type_3);
% Match data type 4 (lamina 4 genes)
m.match_idx_type_4 = find(ismember(m.source_gene_name,m.target_gene_name_type_4)); % index refers to Allen data index
m.match_data_type_4 = m.source_gene_data_nonan_zscore(:,m.match_idx_type_4);
% Match data type 5 (lamina 5 genes)
m.match_idx_type_5 = find(ismember(m.source_gene_name,m.target_gene_name_type_5)); % index refers to Allen data index
m.match_data_type_5 = m.source_gene_data_nonan_zscore(:,m.match_idx_type_5);
% Match data type 6 (lamina 6 genes)
m.match_idx_type_6 = find(ismember(m.source_gene_name,m.target_gene_name_type_6)); % index refers to Allen data index
m.match_data_type_6 = m.source_gene_data_nonan_zscore(:,m.match_idx_type_6);
% % PCA on gene lists
[~,sl2] = pca(m.match_data_type_2);
[~,sl3] = pca(m.match_data_type_3);
[~,sl4] = pca(m.match_data_type_4);
[~,sl5] = pca(m.match_data_type_5);
[~,sl6] = pca(m.match_data_type_6);
figure('DefaultAxesFontSize',16)
%Create MPM average values
metrics = {'R2s'};
for i = 1:length(metrics)
str0 = [metrics{i}];
str3 = [metrics{i} '_av'];
%layers 2
[rho_L2.(str3),pval_L2.(str3),RLO_L2.(str3),RUP_L2.(str3)] = corrcoef(sl2(:,1), mean(m.(str3),1)', 'alpha', 0.05,'rows','pairwise');
% plot(sl2(:,1),mean(m.(str3)), 'o', 'MarkerFaceColor', 'b','MarkerSize',10)
% h = lsline;
% h.LineWidth = 4;
% set(h(1),'color','r')
% print(['./Figure_6/L2_' str0],'-depsc','-r600');
% figure('DefaultAxesFontSize',16)
end
%Create MPM average values
metrics = {'R2s'};
for i = 1:length(metrics)
str0 = [metrics{i}];
str3 = [metrics{i} '_av'];
%layers 3
[rho_L3.(str3),pval_L3.(str3),RLO_L3.(str3),RUP_L3.(str3)] = corrcoef(sl3(:,1), mean(m.(str3),1)', 'alpha', 0.05,'rows','pairwise');
% plot(sl3(:,1),mean(m.(str3)), 'o', 'MarkerFaceColor', 'b','MarkerSize',10)
% h = lsline;
% h.LineWidth = 4;
% set(h(1),'color','r')
% print(['./Figure_6/L3_' str0],'-depsc','-r600');
% figure('DefaultAxesFontSize',16)
end
%Create MPM average values
metrics = {'R2s'};
for i = 1:length(metrics)
str0 = [metrics{i}];
str3 = [metrics{i} '_av'];
%layers 4
[rho_L4.(str3),pval_L4.(str3),RLO_L4.(str3),RUP_L4.(str3)] = corrcoef(sl4(:,1), mean(m.(str3),1)', 'alpha', 0.05,'rows','pairwise');
% plot(sl4(:,1),mean(m.(str3)), 'o', 'MarkerFaceColor', 'b','MarkerSize',10)
% h = lsline;
% h.LineWidth = 4;
% set(h(1),'color','r')
% print(['./Figure_6/L4_' str0],'-depsc','-r600');
% figure('DefaultAxesFontSize',16)
end
%Create MPM average values
metrics = {'R2s'};
for i = 1:length(metrics)
str0 = [metrics{i}];
str3 = [metrics{i} '_av'];
%layers 5
[rho_L5.(str3),pval_L5.(str3),RLO_L5.(str3),RUP_L5.(str3)] = corrcoef(sl5(:,1), mean(m.(str3),1)', 'alpha', 0.05,'rows','pairwise');
% plot(sl5(:,1),mean(m.(str3)), 'o', 'MarkerFaceColor', 'b','MarkerSize',10)
% h = lsline;
% h.LineWidth = 4;
% set(h(1),'color','r')
% print(['./Figure_6//L5_' str0],'-depsc','-r600');
% figure('DefaultAxesFontSize',16)
end
%Create MPM average values
metrics = {'R2s'};
for i = 1:length(metrics)
str0 = [metrics{i}];
str3 = [metrics{i} '_av'];
%layers 6
[rho_L6.(str3),pval_L6.(str3),RLO_L6.(str3),RUP_L6.(str3)] = corrcoef(sl6(:,1), mean(m.(str3),1)', 'alpha', 0.05,'rows','pairwise');
% plot(sl6(:,1),mean(m.(str3)), 'o', 'MarkerFaceColor', 'b','MarkerSize',10)
% h = lsline;
% h.LineWidth = 4;
% set(h(1),'color','r')
% figure('DefaultAxesFontSize',16)
end
%95%
for i = 1:length(metrics)
str0 = [metrics{i}];
str3 = [metrics{i} '_av'];
[Ri,Pi] = corr([sl2(:,1) sl3(:,1) sl4(:,1) sl5(:,1) sl6(:,1) m.(str3)' ],'rows','pairwise');
if signif_flag
[r,c] = find((Pi>(0.05/(8*5))));
for x = 1:length(r)
Ri(r(x),c(x)) = 0;
end
end
Rimax = Ri(6:13,1:5);
Pimax = Pi(6:13,1:5);
imagesc(Rimax)
xticks([1 2 3 4 5])
xticklabels({'L2','L3','L4','L5','L6'})
yticks([1 2 3 4 5 6 7 8])
yticklabels({'D1','D2','D3','D4','D5','D6','D7','D8'})
colormap jet
colorbar
caxis([-0.8 0.8])
end
%95% confidence intervals
Layer_LL_CI = [ RLO_L2.R2s_av(2,1) ; RLO_L3.R2s_av(2,1) ; RLO_L4.R2s_av(2,1) ; RLO_L5.R2s_av(2,1) ; RLO_L6.R2s_av(2,1)];
Layer_UL_CI = [ RUP_L2.R2s_av(2,1) ; RUP_L3.R2s_av(2,1) ; RUP_L4.R2s_av(2,1) ; RUP_L5.R2s_av(2,1) ; RUP_L6.R2s_av(2,1)];
Layer_CI = cat(2,Layer_LL_CI,Layer_UL_CI);
% connectome vs 7T layer postprocessing
% 01.07.19
clear all
% close all
signif_flag = 0;
%Load data
load('../source_data/figure_7/A/stri_cort_av')
load('../source_data/figure_7/A/thal_cort_av')
load('../source_data/figure_7/A/cort_cort_av')
load('../source_data/figure_7/A/inter_av')
load('../source_data/figure_7/A/intra_av')
load('../source_data/figure_7/A/R1_av')
m.R1_av = R1_av;
m.nodes_rmv = [35 39 41 42 46 48 49 84]; %remove cerebellum and amygdala, GP, NA
% process only left regions
stri = [35 36 37 39 40 41];
l_thal = 35;
l_stri = [36 37];
l_hemi = 1:34;
r_hemi = 43:76;
% Load 7T data
metrics = {'R1'};
figure('DefaultAxesFontSize',20)
for i = 1:length(metrics)
str0 = [metrics{i}];
str3 = [metrics{i} '_av'];
[Ri,Pi] = corr([stri_cort_av thal_cort_av cort_cort_av inter_av intra_av m.(str3)' ],'rows','pairwise');
Rimax = Ri(6:13,1:5);
Pimax = Pi(6:13,1:5);
if signif_flag
[r,c] = find((Pimax>(0.05/(8*5))));
for x = 1:length(r)
Rimax(r(x),c(x)) = 0;
end
end
imagesc(Rimax)
title('Streamline-weighted connectivity','FontSize',24,'FontWeight','bold')
xlabel('White matter connection types','FontSize',20,'FontWeight','bold')
ylabel('R1 cortical depth (WM/GM <- Pial)','FontSize',20,'FontWeight','bold')
xticks(1:5)
xticklabels({'C-S','C-T','C-C','Inter-H','Intra-H'})
yticks(1:8)
yticklabels({'D1','D2','D3','D4','D5','D6','D7','D8'})
colorbar
set(gca,'fontsize',18)
colorbar
caxis([-.8 .8])
print('./figures/7A','-dpng','-r600');
end
% connectome vs 7T layer postprocessing
% 01.07.19
clear all
% close all
signif_flag = 0;
%Load data
load('../source_data/figure_7/B/stri_cort_av')
load('../source_data/figure_7/B/thal_cort_av')
load('../source_data/figure_7/B/cort_cort_av')
load('../source_data/figure_7/B/inter_av')
load('../source_data/figure_7/B/intra_av')
load('../source_data/figure_7/B/R2s_av')
m.R2s_av = R2s_av;
% Load 7T data
metrics = {'R2s'};
figure('DefaultAxesFontSize',20)
for i = 1:length(metrics)
str0 = [metrics{i}];
str3 = [metrics{i} '_av'];
[Ri,Pi] = corr([stri_cort_av thal_cort_av cort_cort_av inter_av intra_av m.(str3)' ],'rows','pairwise');
Rimax = Ri(6:13,1:5);
Pimax = Pi(6:13,1:5);
if signif_flag
[r,c] = find((Pimax>(0.05/(8*5))));
for x = 1:length(r)
Rimax(r(x),c(x)) = 0;
end
end
imagesc(Rimax)
title('Streamline-weighted connectivity','FontSize',24,'FontWeight','bold')
xlabel('White matter connection types','FontSize',20,'FontWeight','bold')
ylabel('R2* cortical depth (WM/GM <- Pial)','FontSize',20,'FontWeight','bold')
xticks(1:5)
xticklabels({'C-S','C-T','C-C','Inter-H','Intra-H'})
yticks(1:8)
yticklabels({'D1','D2','D3','D4','D5','D6','D7','D8'})
colorbar
set(gca,'fontsize',18)
colorbar
caxis([-.8 .8])
print('./figures/7B','-dpng','-r600');
end
%connectome vs 7T layer postprocessing
%01.07.19
clear all
% close all
signif_flag = 0;
%Load data
load('../source_data/figure_7/C/stri_cort_av')
load('../source_data/figure_7/C/thal_cort_av')
load('../source_data/figure_7/C/cort_cort_av')
load('../source_data/figure_7/C/inter_av')
load('../source_data/figure_7/C/intra_av')
load('../source_data/figure_7/C/R1_av')
m.R1_av = R1_av;
% Load 7T data
metrics = {'R1'};
figure('DefaultAxesFontSize',20)
for i = 1:length(metrics)
str0 = [metrics{i}];
str3 = [metrics{i} '_av'];
[Ri,Pi] = corr([stri_cort_av thal_cort_av cort_cort_av inter_av intra_av m.(str3)' ],'rows','pairwise');
Rimax = Ri(6:13,1:5);
Pimax = Pi(6:13,1:5);
if signif_flag
[r,c] = find((Pimax>(0.05/(8*5))));
for x = 1:length(r)
Rimax(r(x),c(x)) = 0;
end
end
imagesc(Rimax)
title('R1-weighted connectivity','FontSize',24,'FontWeight','bold')
xlabel('White matter connection types','FontSize',20,'FontWeight','bold')
ylabel('R1 cortical depth (WM/GM <- Pial)','FontSize',20,'FontWeight','bold')
xticks(1:5)