Sorry to get into this conversation, but may be related. Can LNA be applied to ODE systems (dynamically) as well in COPASI? I have only been able to run LNA in steady state using the COPASI interface.
To unsubscribe from this group and stop receiving emails from it, send an email to copasi-user-fo...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/copasi-user-forum/3caee1c2-06e9-443b-a050-0d4fa2f2dfafn%40googlegroups.com.
I am also attaching the output plot where i have run the lna task using basico for different initial A and K, keeping all the other species zero as initial conditions;
The white space is where the lna task is failed to execute. But while doing it in the copasi gui it works completely fine.On Wednesday, November 20, 2024 at 6:09:26 PM UTC manmath panigrahy wrote:from basico import *print("COPASI Basico is imported successfully!")load_model('C:\\Users\\mpanigra\\Desktop\\Multisite pdpc Work folder\\COPASI FILES\\distributive ordered multisite pdpc.cps')get_species()get_parameters()run_lna()import matplotlib.pyplot as pltdf_cov_matrix = get_lna_covariance_matrix()# Generate heatmapplt.figure(figsize=(10, 8))plt.imshow(df_cov_matrix, cmap='viridis', aspect='auto')plt.colorbar()plt.title('LNA Covariance Matrix Heatmap')plt.xticks(range(df_cov_matrix.shape[1]), df_cov_matrix.columns, rotation=90)plt.yticks(range(df_cov_matrix.shape[0]), df_cov_matrix.index)plt.show()output: Could not run LNA Task:COPASI Basico is imported successfully!run_lna()# Get the covariance matrixcov_matrix = get_lna_covariance_matrix()print(cov_matrix)if isinstance(cov_matrix, pd.DataFrame):element_55 = cov_matrix.iloc[5, 5]else:element_55 = cov_matrix[5, 5]print(f"\nElement (5, 5): {element_55}")Could not run LNA Task:K P AP AK PAPP APP A PAP APK K NaN NaN NaN NaN NaN NaN NaN NaN NaN P NaN NaN NaN NaN NaN NaN NaN NaN NaN AP NaN NaN NaN NaN NaN NaN NaN NaN NaN AK NaN NaN NaN NaN NaN NaN NaN NaN NaN PAPP NaN NaN NaN NaN NaN NaN NaN NaN NaN APP NaN NaN NaN NaN NaN NaN NaN NaN NaN A NaN NaN NaN NaN NaN NaN NaN NaN NaN PAP NaN NaN NaN NaN NaN NaN NaN NaN NaN APK NaN NaN NaN NaN NaN NaN NaN NaN NaN Element (5, 5): nanDear Professor,For the uploaded model named distributive ordered multisite pdpc.cps; i run the linear noise approximation task; for some initial conditions of A and K keeping P=90, the lna task executeswell in basico but for other initial conditions (let A=1900, K=800) the copasi software runs smoothly and gives the covariance matrix but basico fails at that. I have attached the copasi model fileand the output that i am getting. Please look into it as i think there is some issue with the package.With regards,Manmath
You can change the target criterion as follows;
In python:
```python
settings = get_task_settings(T.STEADY_STATE)
settings['method']['Target Criterion'] = 'Distance' # or 'Rate' or 'Distance and Rate'
set_task_settings(T.STEADY_STATE, settings)
```
Best
Frank
From: copasi-u...@googlegroups.com <copasi-u...@googlegroups.com> On Behalf Of manmath panigrahy
Sent: Thursday, November 21, 2024 3:46 PM
To: COPASI User Forum <copasi-u...@googlegroups.com>
Subject: Re: [copasi-user-forum] Re: LNA task execution in BASICO
If i am making a new copasi file for a different model altogether, and if this problem still occurs, how can i change the target criterion myself !
To view this discussion visit https://groups.google.com/d/msgid/copasi-user-forum/ed7a1232-0b8b-4a99-a74a-78e96503f69fn%40googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/copasi-user-forum/006c01db3c2f%24ef611c90%24ce2355b0%24%40gmail.com.