-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathExtract_mag_dif_mice.m
31 lines (31 loc) · 1.03 KB
/
Extract_mag_dif_mice.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
function Extract_ang_dif_mice()
% extract network props from each session for this frequency band
% add paths
ToolFolder='/oak/stanford/groups/leanew1/users/apines/scripts/PersonalCircuits/scripts/code_nmf_cifti/tool_folder';
addpath(genpath(ToolFolder));
% set subj list, missing run 6 for 7507
subjList = {'m2000','m7507','m7520','m7522','m7589','m7594'};;
% initialize output file, 6 sessions, 1 for name
outDF=cell(length(subjList),7);
% set common fp
commonFP=['/scratch/users/apines/data/mouse/'];
% for each mouse
for s=1:length(subjList);
disp(s)
for run=1:6
% insert subject ID as first column
outDF(s,1)=subjList(s);
ofFP='/scratch/users/apines/data/mouse/'
ofFP=strjoin([ofFP subjList(s) '_' num2str(run) '_Prop_Feats_Mag.csv'],'');
% load in baseline csvs
if exist(ofFP,'file')
file=readmatrix(ofFP);
outDF(s,(run+1))=num2cell(file(1,2));
end
% end for each run
end
% end for each mouse
end
% save out matrix
writecell(outDF,'/oak/stanford/groups/leanew1/users/apines/data/mice_magsMerged_mice_LSD.csv')
end