-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy paths01_load.m
65 lines (48 loc) · 1.79 KB
/
s01_load.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
AnalysisDir = fileparts(mfilename('fullpath'));
%AnalysisDir = pwd
addpath([AnalysisDir '/Utils/']);
DataDir = '/net/parasite/HCP/derivatives/FundDiffRepo/';
PhenotypeFile = [AnalysisDir '/Data/phenotype_910.csv'];
Nodes = 264;
Edges = (Nodes*(Nodes-1))/2;
NumComp = 75;
ControlAll = 0;
DMNTPN = 1;
NumPerms = 10000;
OutputPath = [AnalysisDir '/Results/'];
Model = 's6_Power264_p50f0b_nonaggr_p35mask';
ParamTemplate = [DataDir 'Connectomes/100206/power_264/parameters.mat'];
CorrTemplate = [DataDir 'Connectomes/[Subject]/power_264/corr.mat'];
dat = readtable(PhenotypeFile);
subs = num2str(dat.Subject);
FD = dat.meanFDpre;
gender = dat.GenderN;
TBV = dat.TBVc;
Age = dat.Age_in_Yrs;
Recon = dat.fMRI_3T_ReconVrs_num;
pheno = [dat.GenExec dat.ProcSpeed dat.PMAT24_A_CR dat.ASR_Extn_T ...
dat.ASR_Intn_T dat.ASR_Attn_Pct dat.NEOFAC_O dat.NEOFAC_C dat.NEOFAC_E ...
dat.NEOFAC_A dat.NEOFAC_N];
pheno_all = pheno;
Train = dat.Include_Train;
Test = dat.Include_Test;
n = size(subs,1);
p = (Nodes*(Nodes-1))/2;
featuremat = load_connectomes(CorrTemplate,subs);
featuremat_all = featuremat;
if (ControlAll)
nuisance = [Age Age.^2 meanFD meanFD.^2 gender TBV TBV.^2 Recon==2 Recon==3];
N = size(nuisance,1);
refnuisance = [mean(Age)*ones(N,1) (mean(Age).^2)*ones(N,1) zeros(N,3) ...
mean(TBV)*ones(N,1) (mean(TBV).^2)*ones(N,1) zeros(N,2)];
else
nuisance = 0*Age;
refnuisance = nuisance;
end
%need to load retest and _rt data also
RetestPhenotypeFile = [AnalysisDir '/Data/phenotype_rt38.csv'];
RetestCorrTemplate = [DataDir 'Connectomes/[Subject]_rt/power_264/corr.mat'];
dat_rt = readtable(RetestPhenotypeFile);
subs_rt = num2str(dat_rt.Subject);
featuremat_rt1 = load_connectomes(CorrTemplate,subs_rt);
featuremat_rt2 = load_connectomes(RetestCorrTemplate,subs_rt);