-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfcsStratHotel.m
44 lines (33 loc) · 1.23 KB
/
fcsStratHotel.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
%% load each part of the screening
allStat = struct();
allDataPool = struct();
% parse folder name
subDataFolerArray = dir(dataFolder);
subDataFolerArray(~[subDataFolerArray.isdir])= []; %Remove all non directories.
subDataFolerArray = setdiff({subDataFolerArray.name},{'.','..'})
NSubDataFoler = length(subDataFolerArray);
for iSubDataFolder = 1:NSubDataFoler
% get subfolder path
subDataFolder = subDataFolerArray{iSubDataFolder};
subDataPath = fullfile(dataFolder, subDataFolder);
fprintf('Reading %s\n', subDataPath)
% load all .fcs data from that folder, and create allStatTmp
[allStatTmp, allDataPoolTmp]= fcscreateallstatForfolder(subDataPath);
%% combind allStatTmp into allStat
NAllStat = length(allStat);
if iSubDataFolder == 1;
NAllStat = 0;
end
NAllStatTmp = length(allStatTmp);
for iAllStatTmp = 1:NAllStatTmp
allStatTmp(iAllStatTmp).iPart = iSubDataFolder;
allStatTmp(iAllStatTmp).dataFolder = subDataFolder;
end
if NAllStat == 0
allStat = allStatTmp;
allDataPool = allDataPoolTmp;
else
allStat(NAllStat+[1:NAllStatTmp]) = allStatTmp;
allDataPool = fcsappend(allDataPool, allDataPoolTmp);
end
end