-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprocessListOfPlates.m
More file actions
97 lines (77 loc) · 2.58 KB
/
processListOfPlates.m
File metadata and controls
97 lines (77 loc) · 2.58 KB
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
function processListOfPlates(datasets_paths_filename, resolution)
% processListOfPlates from a txt file under the format provided by
% OpenBis
%
% This code is specific to the Sinergia project
%
% resolution could be '10x' or '20x', it's used to select parameters
%
% (c) Fethallah Benmansour, fethallah@gmail.com
%
% Written 4/07/2012
% ------------------- set the paths -----------------------
if isempty( strfind(path, [pwd '/Common']) )
addpath([pwd '/Common']);
end
if isempty( strfind(path, [pwd '/IO']) )
addpath([pwd '/IO']);
end
if isempty( strfind(path, [pwd '/Geodesics']) )
addpath([pwd '/Geodesics']);
end
run([pwd '/vlfeat-0.9.16/toolbox/vl_setup']);
if isempty( strfind(path, [pwd '/CellsDetection']) )
addpath([pwd '/CellsDetection']);
end
if isempty( strfind(path, [pwd '/GreedyTracking']) )
addpath([pwd '/GreedyTracking']);
end
if isempty( strfind(path, [pwd '/NeuritesDetection']) )
addpath([pwd '/NeuritesDetection']);
end
if isempty( strfind(path, [pwd '/NeuritesTracking']) )
addpath([pwd '/NeuritesTracking']);
end
if isempty( strfind(path, [pwd '/FeaturesExtraction']) )
addpath([pwd '/FeaturesExtraction']);
end
if isempty( strfind(path, [pwd '/frangi_filter_version2a']) )
addpath([pwd '/frangi_filter_version2a']);
end
if isempty( strfind(path, [pwd '/gaimc']) )
addpath([pwd '/gaimc']);
end
% some environement variables:
setenv('DYLD_LIBRARY_PATH', '/usr/local/bin/;/opt/local/lib/');
setenv('PATH', '/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/local/bin:/usr/local/git/bin:/usr/X11/bin');
% -------- get the list of plates and process -----------
fid = fopen(datasets_paths_filename);
C = textscan(fid, '%s %s %s %s %s');
fclose(fid);
inputDataRoot = '/raid/data/store/';
outputAnalisysRoot = '/raid/data/analysis/ProcessingRiwal/';
matlabpool local
for i= 1:length(C{1})
Sample = C{3}(i);
Identifier = C{4}(i);
Location = C{5}(i);
inputFolder = [inputDataRoot Location{1} '/original/'];
a = dir(inputFolder);
for j = 1:length(a)
if( a(j).isdir && length(a(j).name) > 4 )%&& ~isempty(regexpi(Sample{1},a(j).name))
directoryName = a(j).name;
break;
end
end
inputFolder = [inputFolder directoryName '/' ];%#ok<*AGROW>
disp(inputFolder);
resultsFolder = [outputAnalisysRoot Sample{1} '/'];
if( exist(resultsFolder, 'dir') )
rmdir(resultsFolder, 's');
end
if( ~exist(resultsFolder, 'dir') )
mkdir(resultsFolder);
end
processPlate(inputFolder , resultsFolder, Sample{1}, Identifier{1}, resolution);
end
matlabpool close;