Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Rodrigo Santibáñez
    @glucksfall
    you could convert the kappa model into ODEs with KaDE (part of the kappatools)
    what I do is convert kappa into sbml with KaDE and then use libroadrunner to simulate
    Zelun Li
    @lzl0719
    Sorry, could you point me to the documentation? I couldn't find it?
    Zelun Li
    @lzl0719
    Sorry for having so many questions, is there any way to do sensitivity analysis with this?
    Rodrigo Santibáñez
    @glucksfall
    I believe pysb has a function to do SA, and I'm developing a package to do SA from kappa models
    Zelun Li
    @lzl0719
    Yes, but if I want to use Expression in my model, I will need to use Kappa simulator for my model, is that right?
    Rodrigo Santibáñez
    @glucksfall
    maybe not...
    KaDE --ode-backend sbml model.kappa (after the correction)
    and use tools such as copasi to analyse the model
    libroadrunner could perform metabolic control analysis that is a type of SA
    Rodrigo Santibáñez
    @glucksfall
    that's the output of kade
    Zelun Li
    @lzl0719
    Do I need to install something to use KaDE?
    Rodrigo Santibáñez
    @glucksfall
    yeap... download the compiled kappatools from the github
    otherwise, good luck installing opam and other things to compile from source
    Zelun Li
    @lzl0719
    And I would also need to install libroadrunner? is there a version for Linux?
    Rodrigo Santibáñez
    @glucksfall
    is a python package
    :)
    Princeofthebow
    @Princeofthebow

    Hi there pretty new to Pysb and I'm trying to start to use if for some calculations.

    I have encoutered however the following error:

    FileNotFoundError: [WinError 2] The system cannot find the file specified when running the tutorial code.

    I'm using biogennet 2.5.1, may this be the issue?

    This is the code I'm trying to run

    from pysb import *
    from pysb.simulator import ScipyOdeSimulator

    Model()
    Monomer('A')
    Parameter('k', 3.0)
    Rule('synthesize_A', None >> A(), k)
    t = [0, 10, 20, 30, 40, 50, 60]

    simulator = ScipyOdeSimulator(model)
    simresult = simulator.run()
    print(simresult.species)

    Rodrigo Santibáñez
    @glucksfall
    Hi @Princeofthebow, there is a small problem with your code (missing t in ScipyOdeSimulator:
    from pysb import *
    from pysb.simulator import ScipyOdeSimulator
    
    Model()
    Monomer('A')
    Parameter('k', 3.0)
    Rule('synthesize_A', None >> A(), k)
    t = [0, 10, 20, 30, 40, 50, 60]
    
    simulator = ScipyOdeSimulator(model, t)
    simresult = simulator.run()
    print(simresult.species)
    You need to add BNG2.pl to the path. You could use from pysb.pathfinder import set_path and then set_path('bng', path_to_BNG2.pl)
    Rodrigo Santibáñez
    @glucksfall
    if you installed BNG2 with conda, something like this should work set_path('bng', 'C:/Users/gluck/Anaconda3/share/bionetgen') (change gluck by your user)
    Princeofthebow
    @Princeofthebow
    OK - cool I did not know biogennet used pearl so I will have to install that as well

    I did though succesfully add the .pl to the path and only after doing so it gave me the error you see.

    I'll check after installing pearl

    BTW I'm running everyhting from Jupyter, no Anaconda
    Princeofthebow
    @Princeofthebow
    Ok excellent, both needed fixing and now it works!
    Rodrigo Santibáñez
    @glucksfall
    Great to know!! Feel free to ask anything. BTW, I'm a user of pySB, not part of the dev team.
    Princeofthebow
    @Princeofthebow
    Cool thanks
    I'm actaully getting into it as I woudl like to run gillespie via GPUs
    have you ever used this functionality?
    Rodrigo Santibáñez
    @glucksfall
    No, but I would like to do that.
    Princeofthebow
    @Princeofthebow
    cool I'll tryo to keep you in the loop with a MVE if I get somewhere :-)
    Rodrigo Santibáñez
    @glucksfall
    sure, no problem at all
    Princeofthebow
    @Princeofthebow

    Hi sorry it is me again, I ahve some trouble in understading how the rule definitions work(I'm an engineer and I'm not too familiar with some concepts)

    I would need to model this reaction

    image.png
    where R(A) is a function that depdends non linearly on A
    does anybody know how to do it in pysb?
    Rodrigo Santibáñez
    @glucksfall
    Princeofthebow
    @Princeofthebow
    ow wow thanks I had not spotted that
    Rodrigo Santibáñez
    @glucksfall
    no problem ;)
    Princeofthebow
    @Princeofthebow

    Hi I tried it but it results on an error

    from pysb import *
    from pysb.pathfinder import set_path
    from pysb.simulator import ScipyOdeSimulator
    set_path('bng', 'C:\Program Files\BNG')
    
    Model()
    Monomer('A',['a'])
    Observable('A_total', A())
    Parameter('Hcoeff',1.0)
    Expression('kf_A', A_total*Hcoeff)
    Rule('bindA', A(a=None) + A(a=None) >> A(a=1) % A(a=1), kf_A)
    Parameter('A0',20)
    Initial(A(a=None),A0)
    
    simres = ScipyOdeSimulator(model, tspan=[0,20]).run()

    This is the error I get:

    AttributeError: 'str' object has no attribute 'args'

    Is there some problem with my code?

    Rodrigo Santibáñez
    @glucksfall
    Oh... right. Sorry, I forgot to mention. Last week, another user asked the same about Expression. It seems there is a problem when converting the model into ODEs. The solution, if you could read the conversation history, was export the model into kappa, edit by hand because the observable must be before the parameter that use the observable, and simulate the model using the command line (KaSim).
    Princeofthebow
    @Princeofthebow
    ok that looks tough as I am totally new to this. I simply submitted an issue on the github. Lets see where it gets
    rAntonioH
    @rAntonioh
    hi, i'm trying to set the max_stoich option in BioNetGen using pysb, however generate_network(Model, cleanup=False, **{'max_stoich':3}) results in the following error:
    AttributeError: type object 'Model' has no attribute 'rules'
    this is of course not 'True' because i have written rules, any advice on how to address this?