-
Notifications
You must be signed in to change notification settings - Fork 0
/
m2m.m
104 lines (103 loc) · 3.1 KB
/
m2m.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
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
98
99
100
101
102
103
104
function [m2m_result] = m2m(timeF,N,snaps,sig,mexmodel,doplots)
% This function calculates the best measurement combination
%
%
% [Syntax]
% [results] = m2m(timeF,N,snaps,sig,mexmodel,doplots)
%
% [INPUT]
% timeF Simulation time
% N Number of cells
% snaps Number of snapshots
% sig Sigma (for error model)
% mexmodel MEX file of your model
% doplots 0=no, 1=yes
%
% [OUTPUT]
% results: struct: Results
%
% [EXAMPLE]
% results = m2m(0:800,500,2,0.02,'model_toettcher2008MEX',0)
%
% [Structure]
% m2m_Toolbox
% |-- M2M_analysis
% | |-- M2Marea
% | | |-- M2M_combo_wanderlust
% | | | |-- PathfromWanderlust
% | | | | |-- getMeanWanderlustPath
% | | | | `-- wanderlust
% | | | |-- sbistFACS2PathDensity
% | | | `-- sbistFACSDensityTrafo
% | | `-- moving_average
% | |-- M2M_combinatorics
% | | |-- M2M_Cmatrix
% | | |-- sbistFACS2PATHDensity
% | | `-- sbistFACSDensityTrafo
% | |-- M2M_functions
% | | |-- moving_average
% | | `-- normdata
% | |-- M2M_pre_wanderlust
% | | `-- PathfromWanderlust
% | | |-- getMeanWanderlustPath
% | | `-- wanderlust
% | `-- M2M_twocombo
% `-- M2M_data_generation
% |-- M2M_DNAsimulation
% |-- M2M_duration
% |-- M2M_error_model
% |-- M2M_lognrnd
% |-- M2M_mexmodel
% |-- M2M_purge
% |-- M2M_start
% `-- M2M_timepoints
% profile on
time_m2m=tic;
diary;
m2m_init;
addpath(genpath(workpath));
addpath(genpath([storepath '/' 'm2mresults_' username]));
cd([storepath '/' 'm2mresults_' username '/output']);
filename = datestr(now,30);
m2m_load
m2m_result=([]);
m2m_result.filename=filename;
% workpath='~/methods2models';%Root directory of the m2m-toolbox
% addpath(genpath(workpath));
% statenames = cell(1,32);
statenames = mexmodel('states')';
statenames{1,end+1}='DNA';
% load toettcher_statenames.mat;
% load('~/methods2models/datasets/toettcher_statenames.mat');
input.statenames=statenames;
m2m_result.workpath=workpath;
m2m_result.storepath=storepath;
m2m_result.username=username;
% m2m_load
m2m_result.input=input;
%% Data generation --------------------------------------------------------
disp('Data generation ---------------------------------------------------')
time_datagen=tic;
[input,storage] = M2M_data_generation(input);
m2m_result.data_gen=storage;
toc(time_datagen);
%% -----------------------Analysis (stable)----------------------------------------
disp('Analysis ----------------------------------------------------------')
time_analysis=tic;
pre_results=M2M_analysis(input,storage);
m2m_result.analysis=pre_results;
toc(time_analysis);
%% ----- Analysis (unstable) ------------------------------------------------------
% best = M2M_analysis2(input,storage);
% m2m_result.best=best;
%% Result processing section ------------------------------------------------------
m2m_processing
%% Save the results
m2m_save;
%% Print the result
Result = horzcat(add_combi,add_area);
disp(table(Result)); %Display the result
m2m_thankyou %Thank you message
diary([filename '.log']);
toc(time_m2m);
end