Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Antonio Politi
NPCMaturation
Commits
bddc56d1
Commit
bddc56d1
authored
Aug 06, 2016
by
Antonio Politi
Browse files
gitignore
parent
9c5ed68a
Changes
3
Hide whitespace changes
Inline
Side-by-side
.gitignore
0 → 100644
View file @
bddc56d1
*~
matlabcode/delayedEquationModel/absDelayedMaturation.m
View file @
bddc56d1
classdef
absDelayedMaturation
<
handle
properties
(
Access
=
protected
)
timeI
=
[
0
:
150
];
%intergration time points
dataA
;
%data structure containing array of all data
tpm
;
%time of postmitotic start for non-core NC and Core region [time_start_pm_NC time_start_pm_C]
ti
;
%time interphase assembly start [time_start_ip_NC time_start_ip_C]
end
properties
indir
;
outdir
;
dataF
;
%data structure containing data to be fitted
end
methods
function
MO
=
absDelayedMaturation
(
force
,
showplot
)
if
nargin
<
1
force
=
0
;
end
if
nargin
<
2
showplot
=
0
;
end
MO
.
dataA
=
MO
.
dataIn
(
force
,
showplot
);
end
function
dataA
=
dataIn
(
MO
,
force
,
showplot
)
%read in mature and pre
if
nargin
<
1
force
=
0
;
end
if
nargin
<
2
showplot
=
0
;
end
if
ispc
indir
=
fullfile
([
getenv
(
'HOMEDRIVE'
)
getenv
(
'HOMEPATH'
)
],
'Dropbox'
,
'NPCMaturation'
,
...
'expdata'
,
'emdata'
);
outdir
=
fullfile
([
getenv
(
'HOMEDRIVE'
)
getenv
(
'HOMEPATH'
)
],
'Dropbox'
,
'NPCMaturation'
,
...
'results'
,
'emdata'
);
end
if
ismac
indir
=
fullfile
(
getenv
(
'HOME'
),
'Dropbox'
,
'NPCMaturation'
,
...
'expdata'
,
'emdata'
);
outdir
=
fullfile
(
getenv
(
'HOME'
),
'Dropbox'
,
'NPCMaturation'
,
...
'results'
,
'emdata'
);
end
MO
.
indir
=
indir
;
MO
.
outdir
=
outdir
;
matfile
=
fullfile
(
indir
,
'emdata.mat'
);
if
exist
(
matfile
)
&&
~
force
load
(
matfile
)
return
end
% first entry is minipore second entry is mature pore
data
=
struct
(
'time'
,
[],
'd_noncore'
,
[],
'd_core_i'
,
[],
'd_core_o'
,
[],
't_core_i'
,
[],
't_core_o'
,
[]);
dataA
=
[
data
;
data
];
xlsfile
=
fullfile
(
indir
,
'Minipore-number-to-Antonio-141022.xlsx'
);
dataA
(
2
)
.
time
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'C4:C15'
);
dataA
(
2
)
.
t_noncore
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'D4:E15'
);
dataA
(
2
)
.
t_core_i
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'F4:G15'
);
dataA
(
2
)
.
t_core_o
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'H4:I15'
);
dataA
(
2
)
.
d_noncore
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'D20:E31'
);
dataA
(
2
)
.
d_core_i
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'F20:F31'
);
dataA
(
2
)
.
d_core_o
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'H20:I31'
);
dataA
(
1
)
.
time
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'K4:K15'
);
dataA
(
1
)
.
t_noncore
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'L4:M15'
);
dataA
(
1
)
.
t_core_i
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'N4:O15'
);
dataA
(
1
)
.
t_core_o
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'P4:Q15'
);
dataA
(
1
)
.
d_noncore
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'L20:M31'
);
dataA
(
1
)
.
d_core_i
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'N20:O31'
);
dataA
(
1
)
.
d_core_o
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'P20:Q31'
);
%% read and create surface area
surfdatafile
=
fullfile
(
indir
,
'surfaceNucleus_24h_new.txt'
);
surfdata
=
load
(
surfdatafile
);
dataA
(
1
)
.
surf
=
[
surfdata
(:,
1
)
*
60
surfdata
(:,
2
:
3
)];
dataA
(
1
)
.
surf
=
[
0
surfdata
(
1
,
2
:
3
);
dataA
(
1
)
.
surf
];
% perform a spline fit to smooth the data
dataA
(
1
)
.
surfspl
=
surfSpline
(
dataA
(
1
)
.
surf
(:,
1
),
dataA
(
1
)
.
surf
(:,
2
),
7
,
3
,
8
);
dataA
(
1
)
.
dsurfspl
=
fnder
(
dataA
(
1
)
.
surfspl
,
1
);
save
(
matfile
,
'dataA'
);
end
end
end
classdef
absDelayedMaturation
<
handle
properties
(
Access
=
protected
)
timeI
=
[
0
:
150
];
%intergration time points
dataA
;
%data structure containing array of all data
tpm
;
%time of postmitotic start for non-core NC and Core region [time_start_pm_NC time_start_pm_C]
ti
;
%time interphase assembly start [time_start_ip_NC time_start_ip_C]
end
properties
indir
;
outdir
;
dataF
;
%data structure containing data to be fitted
end
methods
function
MO
=
absDelayedMaturation
(
force
,
showplot
)
if
nargin
<
1
force
=
0
;
end
if
nargin
<
2
showplot
=
0
;
end
MO
.
dataA
=
MO
.
dataIn
(
force
,
showplot
);
end
function
dataA
=
dataIn
(
MO
,
force
,
showplot
)
%read in mature and pre
if
nargin
<
1
force
=
0
;
end
if
nargin
<
2
showplot
=
0
;
end
if
ispc
indir
=
fullfile
([
getenv
(
'HOMEDRIVE'
)
getenv
(
'HOMEPATH'
)
],
'Dropbox'
,
'NPCMaturation'
,
...
'expdata'
,
'emdata'
);
outdir
=
fullfile
([
getenv
(
'HOMEDRIVE'
)
getenv
(
'HOMEPATH'
)
],
'Dropbox'
,
'NPCMaturation'
,
...
'results'
,
'emdata'
);
end
if
ismac
indir
=
fullfile
(
getenv
(
'HOME'
),
'Dropbox'
,
'NPCMaturation'
,
...
'expdata'
,
'emdata'
);
outdir
=
fullfile
(
getenv
(
'HOME'
),
'Dropbox'
,
'NPCMaturation'
,
...
'results'
,
'emdata'
);
end
MO
.
indir
=
indir
;
MO
.
outdir
=
outdir
;
matfile
=
fullfile
(
indir
,
'emdata.mat'
);
if
exist
(
matfile
)
&&
~
force
load
(
matfile
)
return
end
% first entry is minipore second entry is mature pore
data
=
struct
(
'time'
,
[],
'd_noncore'
,
[],
'd_core_i'
,
[],
'd_core_o'
,
[],
't_core_i'
,
[],
't_core_o'
,
[]);
dataA
=
[
data
;
data
];
xlsfile
=
fullfile
(
indir
,
'Minipore-number-to-Antonio-141022.xlsx'
);
dataA
(
2
)
.
time
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'C4:C15'
);
dataA
(
2
)
.
t_noncore
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'D4:E15'
);
dataA
(
2
)
.
t_core_i
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'F4:G15'
);
dataA
(
2
)
.
t_core_o
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'H4:I15'
);
dataA
(
2
)
.
d_noncore
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'D20:E31'
);
dataA
(
2
)
.
d_core_i
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'F20:F31'
);
dataA
(
2
)
.
d_core_o
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'H20:I31'
);
dataA
(
1
)
.
time
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'K4:K15'
);
dataA
(
1
)
.
t_noncore
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'L4:M15'
);
dataA
(
1
)
.
t_core_i
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'N4:O15'
);
dataA
(
1
)
.
t_core_o
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'P4:Q15'
);
dataA
(
1
)
.
d_noncore
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'L20:M31'
);
dataA
(
1
)
.
d_core_i
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'N20:O31'
);
dataA
(
1
)
.
d_core_o
=
xlsread
(
xlsfile
,
'Onlyvalues'
,
'P20:Q31'
);
%% read and create surface area
surfdatafile
=
fullfile
(
indir
,
'surfaceNucleus_24h_new.txt'
);
surfdata
=
load
(
surfdatafile
);
dataA
(
1
)
.
surf
=
[
surfdata
(:,
1
)
*
60
surfdata
(:,
2
:
3
)];
dataA
(
1
)
.
surf
=
[
0
surfdata
(
1
,
2
:
3
);
dataA
(
1
)
.
surf
];
% perform a spline fit to smooth the data
dataA
(
1
)
.
surfspl
=
surfSpline
(
dataA
(
1
)
.
surf
(:,
1
),
dataA
(
1
)
.
surf
(:,
2
),
7
,
3
,
8
);
dataA
(
1
)
.
dsurfspl
=
fnder
(
dataA
(
1
)
.
surfspl
,
1
);
save
(
matfile
,
'dataA'
);
end
end
end
matlabcode/delayedEquationModel/delayedMaturationCls.m
View file @
bddc56d1
classdef
delayedMaturationCls
<
absDelayedMaturation
methods
function
MO
=
delayedMaturationCls
(
force
,
showplot
)
MO
@
absDelayedMaturation
(
force
,
showplot
)
MO
.
dataF
=
MO
.
dataA
;
% for i=1:2
% MO.protF(3-i).core = MO.protA(i).tot_core;
% MO.protF(3-i).noncore = MO.protA(i).tot_noncore;
% end
end
function
so
=
solve
(
MO
,
par
)
area
=
fnval
(
MO
.
dataF
(
1
)
.
surfspl
,
0
);
so
=
ode45
(
@
MO
.
sumPores
,
[
0
:
1
:
200
],
[
area
*
4
;
area
*
6
]
,
odeset
,
par
,
MO
.
dataF
(
1
)
.
surfspl
)
end
function
dydt
=
sumPores
(
MO
,
t
,
y
,
par
,
surfspl
)
area
=
fnval
(
surfspl
,
t
);
dydt
(
1
)
=
par
(
1
)
*
(
par
(
2
)
*
area
-
y
(
1
)
-
y
(
2
))
-
par
(
3
)
*
y
(
1
);
dydt
(
2
)
=
par
(
3
)
*
y
(
1
);
dydt
=
dydt
'
;
end
function
plotResult
(
MO
,
par
)
so
=
solve
(
MO
,
par
);
plot
(
so
.
x
,
[
so
.
y
(
1
,:)
.
/
fnval
(
MO
.
dataF
(
1
)
.
surfspl
,
so
.
x
);
so
.
y
(
2
,:)
.
/
fnval
(
MO
.
dataF
(
1
)
.
surfspl
,
so
.
x
)])
%plot(so.x, par(1)*(par(2)*fnval(MO.dataF(1).surfspl, so.x)-so.y)./fnval(MO.dataF(1).surfspl, so.x))
%plot(so.x, so.y)
end
end
classdef
delayedMaturationCls
<
absDelayedMaturation
methods
function
MO
=
delayedMaturationCls
(
force
,
showplot
)
MO
@
absDelayedMaturation
(
force
,
showplot
)
MO
.
dataF
=
MO
.
dataA
;
% for i=1:2
% MO.protF(3-i).core = MO.protA(i).tot_core;
% MO.protF(3-i).noncore = MO.protA(i).tot_noncore;
% end
end
function
so
=
solve
(
MO
,
par
)
area
=
fnval
(
MO
.
dataF
(
1
)
.
surfspl
,
0
);
so
=
ode45
(
@
MO
.
sumPores
,
[
0
:
1
:
200
],
[
area
*
4
;
area
*
6
]
,
odeset
,
par
,
MO
.
dataF
(
1
)
.
surfspl
)
end
function
dydt
=
sumPores
(
MO
,
t
,
y
,
par
,
surfspl
)
area
=
fnval
(
surfspl
,
t
);
dydt
(
1
)
=
par
(
1
)
*
(
par
(
2
)
*
area
-
y
(
1
)
-
y
(
2
))
-
par
(
3
)
*
y
(
1
);
dydt
(
2
)
=
par
(
3
)
*
y
(
1
);
dydt
=
dydt
'
;
end
function
plotResult
(
MO
,
par
)
so
=
solve
(
MO
,
par
);
plot
(
so
.
x
,
[
so
.
y
(
1
,:)
.
/
fnval
(
MO
.
dataF
(
1
)
.
surfspl
,
so
.
x
);
so
.
y
(
2
,:)
.
/
fnval
(
MO
.
dataF
(
1
)
.
surfspl
,
so
.
x
)])
%plot(so.x, par(1)*(par(2)*fnval(MO.dataF(1).surfspl, so.x)-so.y)./fnval(MO.dataF(1).surfspl, so.x))
%plot(so.x, so.y)
end
end
end
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment