2
$\begingroup$

I have been trying to model calcium oscillations using MatLab, but I cannot obtain the oscillation.

I created a function where I put all the equations and used ode15s to call the function. I have listed the equations and the code.

Can anyone tell me why I am not obtaining the oscillations?

These are the equations along with the codes: enter image description here

r(:,3) = ( (((.029*0.13*1.049 + .21.*.5.*.144).*initi(:,1)) ./  (.144.*1.049.*(.5+ .13)) ) .*( 1- initi(:,3)) ) - (( (.21 *.5 + .029 *.9434) ./ (.5 +.9434) ).*initi(:,3)); 

The values of the upper case Ks are obtained as follows:

enter image description here

and the value of p is 0.5

enter image description here

a(:,1) = power (( (.5 .* initi(:,1) .*(1 - initi(:,3))) ./ ((.5 + .13 ).*(initi(:,1) + .0823)) ),3); % p_o

enter image description here

Jserca is directly substituted in the equation shown below

enter image description here

r(:,1) = (( 1.11.*  a(:,1) + .02 ) .* (  initi(:,2) - initi(:,1) ) ) -( .9 .*  power(initi(:,1),2)) ./ ( power(.1,2) + power(initi(:,1),2) );

enter image description here

 r(:,2) = - r(:,1) .*5.5; % Ce

The constants are shown here:

enter image description here

enter image description here

And this is the desired result:

enter image description here

But I obtain this!

enter image description here

And this is my code:

function[t, initi, r,a]= deyoung()
clear all;
clc; 
close all;


%--------------------------------------------------------------------------
% Initial conditions
%--------------------------------------------------------------------------
initi(:,1) = 0;  %  C  
initi(:,2) = .9; %  y
initi(:,3) = .5; %  Ce


%--------------------------------------------------------------------------
% ODEs
%--------------------------------------------------------------------------
icon=initi; 

tspan=[0 100];

options = odeset('RelTol', 1e-08, 'AbsTol', 1e-08);

[t,initi] = ode15s(@(t,initi) oper(t,initi),tspan,icon, options );

[r,a] = oper(t,initi);

figure();
plot(t,initi(:,1),t,initi(:,3));

end

function [r,a]=oper(t,initi)

    initiSize = size(initi);

    initiColumnCount = initiSize(2);

    if ( initiColumnCount == 1)
        initi = initi';
        a = zeros(1,1); 
    else
        initiRowCount = initiSize(1);
        a = zeros(initiRowCount, 1);
        r = zeros(initiRowCount, initiColumnCount);
    end


    % y
    r(:,3) = ( (((.029*0.13*1.049 + .21.*.5.*.144).*initi(:,1)) ./  (.144.*1.049.*(.5+ .13)) ) .*( 1- initi(:,3)) ) - (( (.21 *.5 + .029 *.9434) ./ (.5 +.9434) ).*initi(:,3));      

    %Po       
    a(:,1) = power (( (.5 .* initi(:,1) .*(1 - initi(:,3))) ./ ((.5 + .13 ).*(initi(:,1) + .0823)) ),3); % p_o

    %C
    r(:,1) = (( 1.11.*  a(:,1) + .02 ) .* (  initi(:,2) - initi(:,1) ) ) - ( .9 .*  power(initi(:,1),2)) ./ ( power(.1,2) + power(initi(:,1),2) );

    %Ce
    r(:,2) = - r(:,1) .*5.5; % Ce

    r = r';

end
$\endgroup$
15
  • $\begingroup$ Welcome to Biology.SE. The problem is either specific to programming (there's a bug in your code) or to biology (you did not understand the process you want to simulate). I don't actually know the concept of calcium oscillation but no one can correctly answer your question for the moment. You should add your code, describe it, describe the output and explain why the output is different from what you expected. I vote to close for the moment and will retract my close vote when the question will be improved. $\endgroup$
    – Remi.b
    Jun 29, 2015 at 1:26
  • $\begingroup$ @Remi.b Is that okay now? $\endgroup$
    – nashynash
    Jun 29, 2015 at 1:37
  • $\begingroup$ Yep, that seems to be answerable now. Good improvement +1. $\endgroup$
    – Remi.b
    Jun 29, 2015 at 2:01
  • 1
    $\begingroup$ @AliceD That is the default line that comes if I select the custom close. Anyways this is clearly off-topic. $\endgroup$
    – WYSIWYG
    Jun 29, 2015 at 5:55
  • 1
    $\begingroup$ @nashynash You are using the equations from a published study, right. So they should work: therefore I assume that the problem must be with the code. In stackoverflow, you need not explain calcium oscillation because your question is not really about if the model works (it works because it is already done by the people who published it. Your program is not replicating it). But before asking in SO try editing your code and examine if you have mistyped any parameter. Do the basic bug checks. You can try this site too: scicomp.stackexchange.com $\endgroup$
    – WYSIWYG
    Jun 29, 2015 at 6:39

1 Answer 1

2
$\begingroup$

I wish to share an open-source modelling study on Ca2+ oscillations in astrocytes which contains a detailed description of the underlying math and even better, it has supplementary Matlab code published alongside (Zeng et al., 2009). This may be of help to check your formulae and script.

Unfortunately I do not feel inclined to start troubleshooting and bug-fixing your formulae and Matlab code, because, as mentioned in the comments, the issue can be anywhere in the chain of events.

Reference
Zeng et al., Biophys J (2009); 97(9): 2429–37

$\endgroup$
1
  • 1
    $\begingroup$ @nashynash - good luck. I'm sorry to see this question closed after all the efforts you put into it. Perhaps you can try another SE and hope for better luck there. $\endgroup$
    – AliceD
    Jun 29, 2015 at 10:50

Not the answer you're looking for? Browse other questions tagged .