-
Notifications
You must be signed in to change notification settings - Fork 0
/
sc_mkp_GC.m
30 lines (23 loc) · 992 Bytes
/
sc_mkp_GC.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
function sc_mkp_GC(rootdir, dirsj, prefix)
% generate procfiles.mat for the GUS STYRYL SCREEN data set
% usage:
% sc_makeprocfiles('');
if isempty(rootdir)
fprintf(1,'Please specify the rootdir');
return;
end
file1 = dir([rootdir filesep dirsj filesep '*DAPI.tif']);
file2 = dir([rootdir filesep dirsj filesep '*Tubulin.TIF']);
procfiles = cell(2, 1);
filenum = length(file2);
for i=1:filenum
procfiles{1}{i} = [rootdir filesep dirsj filesep file1(i).name];
procfiles{2}{i} = [rootdir filesep dirsj filesep file2(i).name];
end
if exist([pwd filesep 'meta' prefix filesep dirsj filesep 'procfiles.mat'], 'file')
unix(['rm -r ' pwd filesep 'meta' prefix dirsj filesep 'procfiles.mat']);
end
[s, msg] = mkdir([pwd filesep 'meta' prefix filesep dirsj]);
filename = [pwd filesep 'meta' prefix filesep dirsj filesep 'procfiles.mat'];
save(filename,'procfiles','rootdir');
fprintf(1, 'Created %s for %d image sets\n', filename, filenum);