Skip to content

Commit 948f9f2

Browse files
committed
fixed paths
1 parent 613796b commit 948f9f2

File tree

4 files changed

+14
-51
lines changed

4 files changed

+14
-51
lines changed

s01_Load.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
%utility funcions
33
addpath /home/slab/users/mangstad/repos/Misc_utils/
44

5-
Exp = '/net/pepper/ABCD/CIFTI/';
5+
Exp = '/net/pepper/ABCD/CIFTI/Scripts/rest_neurocognition/';
66

77
%%
88
%Setup files
9-
DataFile = [Exp '/Scripts/rest_neurocognition/Data/ABCD_rest.csv'];
10-
CorrTemplate = [Exp '/Rest/Gordon_Sub_Cere/[Subject].txt'];
11-
NetsFile = [Exp '/Scripts/rest_neurocognition/Data/gordon_sub_cere_parcels.csv'];
9+
DataFile = [Exp '/Data/ABCD_rest.csv'];
10+
CorrTemplate = [Exp '/Data/Gordon_Sub_Cere/[Subject].txt'];
11+
NetsFile = [Exp '/Data/gordon_sub_cere_parcels.csv'];
1212

1313
%%
1414
%setup

s02_BBS.m

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
%%
2-
%utility funcions
3-
addpath /home/slab/users/mangstad/repos/Misc_utils/
42

53
NumComp = 250;
64
Perms = 10000;
@@ -68,42 +66,7 @@
6866
results_g_wo_perms = mc_bbs_perm(featuremat(subset2,:),mainpheno(subset2,:),nuisance(subset2,:),folds_sub2,NumComp,Perms,'LOSOPheno',0,'Scores',results_g_white.Aa);
6967
results_g_wo_nih_perms = mc_bbs_perm(featuremat(subset2,:),nihpheno(subset2,:),nuisance(subset2,:),folds_sub2,NumComp,Perms,'LOSOPheno',0,'Scores',results_g_white.Aa);
7068

71-
results_g_all_perms_dsg = mc_bbs_perm(featuremat,losophenoG,nuisance,folds,NumComp,Perms,'LOSOPheno',0,'Scores',results_g_all.Aa);
72-
results_g_all_perms_dss1 = mc_bbs_perm(featuremat,losophenoS1,nuisance,folds,NumComp,Perms,'LOSOPheno',0,'Scores',results_g_all.Aa);
73-
results_g_all_perms_dss2 = mc_bbs_perm(featuremat,losophenoS2,nuisance,folds,NumComp,Perms,'LOSOPheno',0,'Scores',results_g_all.Aa);
74-
results_g_all_perms_dss3 = mc_bbs_perm(featuremat,losophenoS3,nuisance,folds,NumComp,Perms,'LOSOPheno',0,'Scores',results_g_all.Aa);
75-
76-
%now calculate proper dropsite performance, since LOSOPheno isn't working
77-
%at the moment for permutations
78-
79-
80-
81-
82-
%permute g pheno and measure dmntpn
83-
inmask = zeros(418,418);
84-
for i = 1:max(nets)
85-
inmask(nets==i,nets==i) = 1;
86-
end
87-
inmask = inmask==1;
88-
89-
dmntpn = zeros(418,418);
90-
idx = [3,5,8,11,12];
91-
for i = 1:numel(idx)
92-
for j = 1:numel(idx)
93-
dmntpn(nets==idx(i),nets==idx(j)) = 1;
94-
dmntpn(nets==idx(j),nets==idx(i)) = 1;
95-
end
96-
end
97-
dmntpn = (dmntpn - inmask)>0;
98-
inmask = mc_flatten_upper_triangle(inmask);
99-
dmntpn = mc_flatten_upper_triangle(dmntpn);
100-
101-
mdl_true = fitlm([Aall(good1,1:250) nuisance(good1,:)],dat.G_lavaan(good1));
102-
zcons = zscore(coeffall(:,1:250)*mdl_true.Coefficients.Estimate(2:251));
103-
104-
supra = abs(zcons)>2;
105-
supra = supra';
106-
100*sum(inmask)/numel(inmask)
107-
100*sum(dmntpn)/numel(dmntpn)
108-
100*sum(supra.*inmask)/sum(supra)
109-
100*sum(supra.*dmntpn)/sum(supra)
69+
results_g_all_perms_dsg = mc_bbs_perm(featuremat,losophenoG,nuisance,folds,NumComp,Perms,'LOSOPheno',1,'Scores',results_g_all.Aa);
70+
results_g_all_perms_dss1 = mc_bbs_perm(featuremat,losophenoS1,nuisance,folds,NumComp,Perms,'LOSOPheno',1,'Scores',results_g_all.Aa);
71+
results_g_all_perms_dss2 = mc_bbs_perm(featuremat,losophenoS2,nuisance,folds,NumComp,Perms,'LOSOPheno',1,'Scores',results_g_all.Aa);
72+
results_g_all_perms_dss3 = mc_bbs_perm(featuremat,losophenoS3,nuisance,folds,NumComp,Perms,'LOSOPheno',1,'Scores',results_g_all.Aa);

s03_FullPCA.m

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
%%
22
%Setup output file
3-
OutputFile = [Exp '/Scripts/rest_neurocognition/Results/ABCD_rest_CIFTI_expressions.csv'];
3+
OutputFile = [Exp '/Results/ABCD_rest_CIFTI_expressions.csv'];
44
NumComp = 250;
55

66
%%
@@ -36,7 +36,7 @@
3636

3737
%%
3838
%consensus
39-
betas = load([Exp '/CIFTI/Scripts/rest_neurocognition/Results/mm_betas.csv']);
39+
betas = load([Exp '/Results/mm_betas.csv']);
4040
cons = coeffall(:,1:NumComp)*betas;
4141

4242
%%
@@ -45,16 +45,16 @@
4545

4646
close all
4747
plot_jica_component(cons(:,1)',1,1,2,nets,'Mixed Model Consensus',[1:16]);
48-
print([Exp '/Scripts/rest_neurocognition/Results/consensus.pdf'],'-dpdf','-r600');
48+
print([Exp '/Results/consensus.pdf'],'-dpdf','-r600');
4949

5050
tmp = zcons(:,1)';
5151
tmp = mc_unflatten_upper_triangle(tmp);
5252
tmp = tmp + tmp';
53-
save([Exp '/Scripts/rest_neurocognition/Results/consensus_z_square.txt'],'tmp','-ASCII');
53+
save([Exp '/Results/consensus_z_square.txt'],'tmp','-ASCII');
5454

5555
close all
5656
plot_jica_component(cons(:,1)',1,1,2,nets,'Mixed Model Consensus',[1:16]);
57-
print([Exp '/Scripts/rest_neurocognition/Results/consensus.svg'],'-dsvg','-r600');
57+
print([Exp '/Results/consensus.svg'],'-dsvg','-r600');
5858

5959

6060
dmntpn = zeros(418,418);

s05_Variance.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@
9393
network1 = NetNames(ind(u,1));
9494
network2 = NetNames(ind(u,2));
9595
output = table(network1,network2,posneg,g,s1,s2,s3,cardsort,flanker,list,pattern,picture,picvocab,reading,ravlt_sd,ravlt_ld,wiscv,lmt);
96-
writetable(output,'Results/network_21_suprathreshold.csv');
96+
writetable(output,[Exp '/Results/network_21_suprathreshold.csv']);

0 commit comments

Comments
 (0)