Comments (6)
Hello,
The documentation you are referring to sounds a bit old (12 Jan 2019?). I've developed the project more recently than that so my first suggestion would be to just ensure you are using the most up to date version of everything. You can find the documentation here. Also, try ensuring you are using the most recent pycotools.
$ pip uninstall pycotools3
then
$ pip install pycotools3 --no-cache-dir
the --no-cache-dir
option just forces pip to redownload the package, rather than using a cached version.
I've tried the following on my own machine, which works as expected.
Let me know how it goes - all the best
Ciaran
import os
import site
from pycotools3 import model, tasks, viz
working_directory = <input working directory here>
if not os.path.isdir(working_directory):
os.makedirs(working_directory)
copasi_file = os.path.join(working_directory, 'michaelis_menten.cps')
if os.path.isfile(copasi_file):
os.remove(copasi_file)
antimony_string = """
model michaelis_menten()
compartment cell = 1.0
var E in cell
var S in cell
var ES in cell
var P in cell
kf = 0.1
kb = 1
kcat = 0.3
E = 75
S = 1000
SBindE: S + E => ES; kf*S*E
ESUnbind: ES => S + E; kb*ES
ProdForm: ES => P + E; kcat*ES
end
"""
with model.BuildAntimony(copasi_file) as loader:
mm = loader.load(antimony_string)
from pycotools3.
from pycotools3.
Hi Vibha,
I've tested pycotools3 on both Copasi 4.24 and 4.25 and behavior is the same as far as I can tell so you're best off using the most recent version.
As for Python, I've also tested this on 3.7 but ran into troubles because of a dependency (tellurium). I haven't chased this up for a while so it may work. If you wanted to quickly test it, it would be a simple case of writing a script (or notebook) that works on Python 3.6, then switching to a Python 3.7 environment and seeing if it works. However, for the time being, 3.6 works well enough.
Jupyter notebooks also work well enough. These days I tend to just use Pycharm, but notebooks are the preference for many.
Pycotools dependencies should install themselves with pycotools. The only exception is COPASI itself. The assumption is that you already have COPASI installed and the path to the copasi/bin
folder (i.e. where the copasi binaries are kept) are in your path environment variable. An easy way to test this is to run the command CopasiUI
and see if it opens the COPASI GUI.
Good luck,
Ciaran
from pycotools3.
from pycotools3.
from pycotools3.
Hi Vibha,
It looks like there are syntax errors in your antimony model - In antimony, parenthesis are reserved for functions. I suspect this will work if you were to just remove them from your variable naming.
You can find some documentation here.
Something else that can be helpful is to build you model in COPASI, export the SBML and then use a tellurium
function tellurium.tellurium.sbmlToAntimony(sbml)
here to create an antimony string. I found this useful when I was learning how to use Antimony.
Ciaran
from pycotools3.
Related Issues (9)
- report_type keyword for Profile Likelihood HOT 3
- Question about pycotools vs. python bindings for COPASI HOT 1
- Attribute error in tasks.MultiModelFit and name error in utils HOT 4
- how to convert the compartment unit and particle number into molarity HOT 2
- Pip installation failing with dependencies HOT 1
- Retrieving Differential Equations from Copasi File, Antimony String, etc., using Pycotools3 HOT 3
- Not SBML file HOT 2
- SBML Import HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycotools3.