Java: Sensitivity Analysis

42 views
Skip to first unread message

Hikmet Emre Kaya

unread,
Nov 8, 2022, 4:59:58 AM11/8/22
to COPASI User Forum
Hello,

I was wondering how sensitivity analysis works in Java Bindings.

This example shows the setup in Python, so I understand how to determine the cause and effect etc, but how does one collect the results after running the task process? Do we need to use a DataHandler?

Thanks.

Frank Bergmann

unread,
Nov 8, 2022, 5:39:36 AM11/8/22
to COPASI User Forum
Hello, 

after running the task, the sensitivities are available from the  CSensProblem class: 

   problem.getResultAnnotated() // unscaled sensitivities
   problem.getScaledResultAnnotated() // scaled sensitivities
   problem.getCollapsedResultAnnotated() // summarized sensitivities

the result is returned as CDataArray. 

Let us know if you need more help. 

best
Frank

Hikmet Emre Kaya

unread,
Nov 9, 2022, 3:24:20 AM11/9/22
to COPASI User Forum
Thanks, it does work!

Hikmet Emre Kaya

unread,
Nov 11, 2022, 3:58:26 AM11/11/22
to COPASI User Forum
Hello again, Frank.

I had a more general question about sensitivity analysis. Why does the same sensitivity analysis on the same model yield different results in different versions of COPASI?

Frank Bergmann

unread,
Nov 11, 2022, 9:09:13 AM11/11/22
to COPASI User Forum
Hello, 

if you give us a concrete example, we could look into it in more detail. We continuously aim to improve the algorithms, for example for steady state detection. Or aim to improve performance, example employing JIT compilations. This could explain some differences. 

Again, if you provide more detail, that would help. 

best
Frank

Hikmet Emre Kaya

unread,
Nov 11, 2022, 9:17:11 AM11/11/22
to COPASI User Forum
Sure,

I am working on the model attached to this message.

I was also wondering if it is possible to run a parameter scan with the subtask being sensitivities, where the cause is initial concentrations and the effect is [pERK] transient concentration. The parameter would be the initial concentration of a drug molecule [PLX4032]_0 (changed from 0 to 150). Sensitivities seems to be among the parameter scan options, but I could not figure out how to acquire the data.

Thanks,

Hikmet Emre Kaya
MAP3K8_Thyroid_Spheres_V3.4.cps

Frank Bergmann

unread,
Nov 11, 2022, 10:15:52 AM11/11/22
to COPASI User Forum
Hello, 

in your model you have many species that begin with an initial value of 0. The delta minimum you have specified in the Sensitivities is set to 1e-12. That value is rather small for the steady state calculation (where a value would be compared between the steady state for an initial concentration of 0 and the steady state for an initial concentration of 1e-12). Increasing that value made values between COPASI versions comparable. I'm not sure if that was the issue you were having without knowing more details about the different COPASI versions you tried. 

As for how you retrieve the data from a scan over sensitivities, you could try the datahandler class, with During CNs of the initial concentration you are scanning over and the cns to the sensitivities you are interested in, for example: 

CN=Root,Vector=TaskList[Sensitivities],Problem=Sensitivities,Array=Sensitivities array[\[pEGFR\]_0]

Should that not work, you could always create a report for this as well. 

I hope that helps, 
best
Frank
Reply all
Reply to author
Forward
0 new messages