input experimental data as a time-dependent parameter in COPASI

421 views
Skip to first unread message

Junli Liu

unread,
Jan 29, 2015, 11:07:01 AM1/29/15
to copasi-user-forum

My question is:

 

  1. I have a time-dependent experimental data set  (which is calcium concentration).

  2. I have a model that uses calcium concentration as a parameter (which is time-dependent).

 

Can I read in this calcium concentration in COPASI and use the time-dependent calcium concentration as a (time-dependent) parameter in COPASI.

 

What I know is that I can input “Experiments” under “Parameter Estimation”. However, after that, I do not know how to use the experimental data in my model. I do not need to do parameter estimation. What I need is to input my experimental data, then use those experimental data as a (time-dependent) parameter in my model. Can I use "Global quantities" to do this? I have tried, but I could not find a way to do this.
Many thanks
James

Juergen Pahle

unread,
Jan 29, 2015, 12:04:42 PM1/29/15
to copasi-u...@googlegroups.com
Hello James,

currently, there is no automated way that lets you do what you requested
in Copasi.

However, there are a number of workarounds that might be useful:
1) Approximate your experimental data with a suitable time-dependent
function and assign this function to a global quantity that can then be
used throughout your model.
2) If you only have a few data points you could use piecewise-defined
functions or even events to represent your data with a
piecewise-constantly (or with some more effort piece-wise linearly)
defined global quantity.
3) Use a separate programming system to implement your model, possibly
still using Copasi in a simulation loop via Copasi's language bindings.
4) Wait until we implement such a feature... (we actually had thought
about this in the past but I cannot guarantee that this will be
implemented in the foreseeable future).

Hope this helps!

Best wishes,
Juergen


On 29/01/2015 17:07, Junli Liu wrote:
> My question is:
>
> 1.
>
> I have a time-dependent experimental data set (which is calcium
> concentration).
>
> 2.
>
> I have a model that uses calcium concentration as a parameter (which
> is time-dependent).
>
> Can I read in this calcium concentration in COPASI and use the
> time-dependent calcium concentration as a (time-dependent) parameter in
> COPASI.
>
> What I know is that I can input “Experiments” under “Parameter
> Estimation”. However, after that, I do not know how to use the
> experimental data in my model. I do not need to do parameter estimation.
> What I need is to input my experimental data, then use those
> experimental data as a (time-dependent) parameter in my model. Can I use
> "Global quantities" to do this? I have tried, but I could not find a way
> to do this.
> Many thanks
> James
>
> --
> You received this message because you are subscribed to the Google
> Groups "COPASI User Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to copasi-user-fo...@googlegroups.com
> <mailto:copasi-user-fo...@googlegroups.com>.
> To post to this group, send email to copasi-u...@googlegroups.com
> <mailto:copasi-u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/copasi-user-forum/CAPhESuHtTzQ1SJbB%2BbgESgd624o7wkAEzVz3C9QOYEK4PjxaNg%40mail.gmail.com
> <https://groups.google.com/d/msgid/copasi-user-forum/CAPhESuHtTzQ1SJbB%2BbgESgd624o7wkAEzVz3C9QOYEK4PjxaNg%40mail.gmail.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Pedro Mendes

unread,
Jan 29, 2015, 12:09:11 PM1/29/15
to copasi-u...@googlegroups.com
Juergen's answers are correct if calcium is indeed a parameter in the
model (or if you want it to be one). However it could well be that it is
a variable (the most common case) and you just want the model to be able
to reproduce the experimental curve. If so then this is a typical
parameter estimation problem. What you need to decide is what parameters
(eg kinetic constants) you allow the sofware to change in order to fit
the experimental calcium curve.

James should clarify this as the two approaches have very different
solutions.

Pedro
--
Pedro Mendes
Professor of Computational Systems Biology
School of Computer Science
Manchester Centre for Integrative Systems Biology
University of Manchester

Manchester Institute of Biotechnology
131 Princess Street
Manchester, M1 7DN, U.K.

jliu.b...@googlemail.com

unread,
Jan 29, 2015, 1:41:03 PM1/29/15
to copasi-u...@googlegroups.com, pedro....@manchester.ac.uk
Thanks a lot to Juergen and Pedro.

In our experiments, we use certain means to induce change in calcium concentration, which is quantitatively controllable. Then, the time-dependent calcium binds with different proteins, which have fixed amounts. We are able to measure the free calcium in the cells, and therefore we know the calcium concentration, which is time-dependent. Based on the free calcium concentration we have measured, we like to model how each protein binds with calcium. Therefore, in our model, calcium concentration is a time-dependent parameter and protein-calcium complexes are variables. Thus, our model uses calcium concentration as time-dependent parameters with a large number of variables, which are protein-calcium concentrations. Therefore, i think the questions I have asked are accurate, i.e.  how to implement a model with time-dependent parameter in COPASI? We have more then 3000 data points for calcium concentration, therefore, it is not possible to type in one by one.

Many thanks for your quick reply to my questions.

James

Felix Winter

unread,
Jan 30, 2015, 10:19:32 AM1/30/15
to copasi-u...@googlegroups.com
Hi James,

If it is in principle possible to approximate the concentration via a piecewise
constant function you could also use events to set the concentration in a
time-dependent manner. For your situation, with the 3000 data points I would
also refrain from doing this by hand, but there are at least two possible
approaches using a programming language of your choice. The first would be to
edit the .cps directly. The second approach which I would suggest is to export
your model to SBML and then use the libSBML to add the events you need. To show
how this can be done I prepared the attached files.

first.cps contains a single reaction (competitive inhibition) where the
concentration of the inhibitor is set to zero.
first.xml is the SBML version of this model (created using File->Export SBML)
Quelle.cpp contains some C++ code which uses libSBML to add ten events into the
model.
second.xml is the resulting SBML file
second.cps is again a copasi file, created by using the File->Import SBML
command in Copasi

The second Copasi file (second.cps) contains the ten events which adjust the
concentration of the inhibitor for the single reaction. Using this approach, it
should be possible to add all your information into a Copasi file. The only
downside is that the concentration will be constant between two events.

I compiled the source using VS2013 and a recent release of libSBML.

Maybe this is a way you want to go.

Best regards, Felix
second.xml
first.xml
Quelle.cpp
first.cps
second.cps

Felix Winter

unread,
Feb 2, 2015, 11:02:57 AM2/2/15
to copasi-u...@googlegroups.com
Hi again,

And sorry for the second post on the same topic. I just realized that the
restriction I made in the last email by stating that using events would give you
constant piecewise concentrations is plainly wrong. As Juergen already stated
before events can also give you a piecewise linear functions, which might
already be a much better approximation. But with a little pre-processing of your
experimental data you can basically use the events to interpolate your data with
any piecewise defined function you desire.

Here are two examples:
Interpolation with a polygonal chain: (i.e. piecewise linear, Juergens
suggestion)
http://files.kapora.de/polygonalChain.cps
Interpolation with cubic splines:
http://files.kapora.de/cubicSpline.cps

(Both files in one zip file: http://files.kapora.de/EventsExamples.zip )

The second example gives you a continuous solution and has in addition some
other nice mathematical properties. The downside is that you have to calculate
the parameters for your polynomials before outside of COPASI.

For both solutions you obviously still need a way to insert the events
automatically as entering them by hand is only feasible for a small amount of
measured values. But if you find a way to do so, you should be able to solve
your initial problem.

Felix

P.S. I also realized that the code I attached to my previous email has a memory
leak. Sorry for that. Please handle it with care ;-)

D. Oh

unread,
Dec 7, 2018, 12:50:22 PM12/7/18
to COPASI User Forum
Hi,

I was wondering if this feature has been implemented in COPASI now. I have the same problem. I have a calcium input data (time-dependent concentration for calcium) that I want to put into my model as one of the species. 

Thanks

juergen

unread,
Dec 8, 2018, 10:24:04 AM12/8/18
to COPASI User Forum
Dear D. Oh,

Yes, we indeed have a feature now in COPASI which admits the coupling of your model to (experimental) kinetic data, e.g. calcium concentration time courses.

After you have linked your model to a file that contains experimental (timecourse) data in exactly the same way as you would do for a parameter fitting (i.e. defining the file and mapping its columns to model entities), you should use Menu -> Tools -> Create Events for Timeseries Experiment. This will create an event for each entry in the time course experiment, so that at the specified times during a simulation the values for the mapped species concentrations will be updated with the values given in the file. In effect, this approximates the experimental time course in a piecewise-constant fashion.

Depending on the time resolution of your experimental data, this approximation will be better or worse. From our experience this works very well though.

Hope that helps!
Juergen

Reply all
Reply to author
Forward
0 new messages