-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathExampleReportScript.m
executable file
·49 lines (37 loc) · 1.32 KB
/
ExampleReportScript.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
%% Init
clear
close all
clc
stkshow('close','all');
% place where the copy of the EKARevAnalysisFunctions are (the EKARev repo)
addpath /home/rwollman/Projects/InVitroWounding/EKARevAnalysisFunctions/
%% Key user input - the path where the images are
pth='/data/Images/anna/InVitroWounding/EKARev_ATP_GM6001_2013Jul09';
%% Init MD / R and create the Props per position
MD=Metadata(pth);
R = MultiPositionSingleCellResults(pth);
R.PosNames = unique(MD,'Position');
% Props are the property that
Props = MD.NewTypes;
%% Main loop
t0=now;
for i=1:numel(R.PosNames)
% output timing
fprintf('%s %s\n',R.PosNames{i},datestr(now-t0,13));
% trick to prevent segmenting if segmentation exist already
Lbl = @() segmenetEKARev(MD,R.PosNames{i});
Lbl = setLbl(R,Lbl,R.PosNames{i});
% measure intensities
[Erk,Terk,FretStk] = measureEKARevFRET(MD,R.PosNames{i},Lbl);
% add measurements
addTimeSeries(R,'Erk',Erk,Terk,R.PosNames{i});
add(R,'FretStack',FretStk,R.PosNames{i});
% add Position properties
for j=1:numel(Props)
tmp=unique(MD,Props{j},'Position',R.PosNames{i});
setProperty(R,Props{j},tmp(1),R.PosNames{i});
end
end
%% save results
R.analysisScript=fullfile(pwd,mfilename);
R.saveResults;