Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Hung-Yi Wu
    @hywu0110
    trying to load E coli metabolic network in SBML format, downloaded from Biomodels. Just 3.3 MB, then PySB said out of memory (I have 16 GB RAM)... Any suggestions will be appreciated
    Rodrigo Santibáñez
    @glucksfall
    do you refer to a GSMM of E coli?
    or is it a kinetic model of metabolism?
    I guess kinetic model?
    Rodrigo Santibáñez
    @glucksfall
    no, it is not
    is the iAF1260 model
    a GSMM
    oh wait
    give me a moment
    Ok, here's the paper about the model https://www.ncbi.nlm.nih.gov/pubmed/17593909
    you'll see it is a GSMM and you need to look for COBRA https://opencobra.github.io/
    Rodrigo Santibáñez
    @glucksfall
    What confused me was the .m file (Octave, MATLAB) that you can download from https://www.ebi.ac.uk/biomodels/MODEL3023641273#Files
    if you look the .m file, you'll see a kinetic model
    well, because a GSMM is S*v = 0
    take a look into this paper https://www.nature.com/articles/srep39647
    Rodrigo Santibáñez
    @glucksfall
    I worked with GSMMs. I can help you if you need it. Probably is a good discussion if PySB should allow supports for GSMM, but COBRA (for python, matlab, and others) does a good job "simulating" and analysing GSMMs
    (I said "simulating" because GSMM are optimization problems)
    Hung-Yi Wu
    @hywu0110
    I know they use COBRA in the paper, but I hope to make it work in Python. All I need is the stoichiometry matrix, right? I was hoping PySB has a nice function to get that matrix. The last resort is to parse the xml file as a regular xml file and build the matrix myself.
    I have the optimization part sorted out by scipy.optimize.minimize
    Ok I'm stupid. Just found there's cobrapy.
    @glucksfall thanks a ton fot telling me there's a difference between kinetic model and GSMM model!
    Rodrigo Santibáñez
    @glucksfall
    don't worry
    I assumed you were starting with GSMMs. That because I said details you already know
    Still, if you need help with pycobra, I can look at old scripts I have. I work now with PySB and kappa to model and simulate metabolism.
    Hung-Yi Wu
    @hywu0110
    I just started to pick up knowledge in this field. It would be great if you have some good primer papers on top of your head! Not just GSMM, but also metabolism modeling and simulation.
    Rodrigo Santibáñez
    @glucksfall
    @hywu0110 I'll send you papers ASAP. I promise I won't forget to do that.
    Hung-Yi Wu
    @hywu0110
    Thank you so much!
    Alex Lubbock
    @alubbock
    The PySB team is pleased to announce the release of v1.9.0. See the release notes for details.
    Rodrigo Santibáñez
    @glucksfall
    Congrats @alubbock
    Alex Lubbock
    @alubbock
    PySB v1.9.1 is now out, which contains a bug fix for the BngSimulator. See the release notes for details.
    briansebzhou
    @briansebzhou
    Hi there, I've installed pysb via the Anaconda command conda install -c alubbock pysb, but python keeps giving me the error message that there's no module named 'pysb'
    I'm a mac user and when I type in the command "conda install -c alubbock pysb" again it tells me "#all requested packages already installed"
    when I type in "pip install pysb" each line says "requirement already satisfied"
    briansebzhou
    @briansebzhou
    This happens in IDLE only, when I open the system version of Python or IPython things seem to be fine
    I've installed python 3.7
    Rodrigo Santibáñez
    @glucksfall
    It's because the python (and pip) from the anaconda folder takes preference over the system installed python (or viceversa)
    type which python3 (python3.7) in a terminal to know where is installed python
    Alex Lubbock
    @alubbock
    Try running python -m idlelib, which should launch IDLE for the currently active version of Python
    Rodrigo Santibáñez
    @glucksfall
    type whereis python3 (python3.7) in a terminal to know every path were is python
    *where is python
    also, pip, pip2 and pip3 are related to different python versions
    briansebzhou
    @briansebzhou
    I think it's good now, thanks!
    opurcell
    @opurcell
    Hi, I have a question about monomer specifications. Does pySB automatically handle under-specifying a monomer by performing the operation on all possible versions of the monomer? for example, if I have defined a monomer X and it can be bound or unbound, and have two states: 'active' or 'inactive'. If I refer to that monomer, but I dont care whether the monomer is active or inactive, can I just not specifiy that i.e. just specific bound or not bound, and leave the specification for the activity empty? Will pySB handle this or do I have to explicity define all possible states whenever I refer to a monomer? With a larger number of states this would be time-consuming. I also have a question about applying rules to complexes. For example, lets say I have 10 monomers and I generate rules that form all possbible complexes between them. Is it possible to then refer to these complexes somehow at a later time in my code? It seems like there is a .monomer object but not a .complex object?
    Rodrigo Santibáñez
    @glucksfall
    you could "alias" complexes, for instance complexAB = A() % B(), then use complexAB in rules
    Rodrigo Santibáñez
    @glucksfall
    You need to refer to specific states when using Init. If not, the simulator assign the initial quantity to default states. The same applies for observables. Your monomers can have 4 states, so observables range from X() accounting for all monomers (bound and unbound, active and inactives) to specific ones stating the state of each site. However, in Rules, you define only the states needed for the reaction (for instance, to dimerize, X must be inactive, active, or you don't care about it)
    This is an example from a model I dev: first, I "aliased" the dimer cplx_rpoa_rpoa = Prot_rpoA(PBD_01 = 1, PBD_02 = None) % Prot_rpoA(PBD_01 = None, PBD_02 = 1)
    Rodrigo Santibáñez
    @glucksfall
    Then used it in a Rule: Rule('rpoa_rpoa', free_rpoa + free_rpoa != cplx_rpoa_rpoa, Parameter('rpoa_rpoa_fwd', 1), Parameter('rpoa_rpoa_rvs', 1)
    Alex Lubbock
    @alubbock
    Hi @opurcell, rule-based modeling frameworks like PySB are designed to handle exactly the kinds of scenarios you mention. In rules or observables, if you don't specify states or bonds for a particular site, the pattern matches any state or bond (bound or unbound). In your example, if you just specify X() in a rule or observable, it will match both states, regardless of whether it is bound or not. You can also generate model components (rules, observables, initial conditions etc.) programmatically using a for loop or similar.
    Leonard Harris
    @lh64
    For complexes, you can access them through ‘model.species’.