Git Product home page Git Product logo

skimpy's People

Contributors

aslisahin3 avatar mariamasid avatar psalvy avatar remidhum avatar weilandtd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

skimpy's Issues

Conda package rasies unpecified error when ploting with bokeh

Upon plotting the conda package raises the following "mysterious" error message:

Start : This command cannot be run due to the error: The system cannot find the file specified.
At line:1 char:1
+ Start "file:///mnt/c/Users/danie/src/TESTING_REALM/skimpy/tutorials/g ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Start-Process], InvalidOperationException
    + FullyQualifiedErrorId : InvalidOperationException,Microsoft.PowerShell.Commands.StartProcessCommand

While still producing the desired HTML file. Currently investigating any help welcome!

Adding reactions to a model with compartments

Hello all,

Thank you a lot for this nice package, it has made many things a lot easier already. However, I run into a problem with compile_ode() when I try to add reactions to an already existing model.

The code:

filenames={
"kmodel":"models/varma_strain_1.yml"}
`kmodel=load_yaml_model(filenames['kmodel'])```

name = 'R1'

Define reaction reactants sets

metabolites = ReversibleMichaelisMenten.Reactants(substrate = 'A_c',
product = 'B_c')
parameters1 = ReversibleMichaelisMenten.Parameters(
vmax_forward = 1.0,
k_equilibrium=2.0,
km_substrate = 10.0,
km_product = 10.0,
total_enzyme_concentration = 1.0,)
####### Create the reaction object
R1 = Reaction(name=name,
mechanism = ReversibleMichaelisMenten,
reactants=metabolites,
)
kmodel.add_reaction(R1)
kmodel.parametrize_by_reaction({R1.name:parameters1})
kmodel.prepare()
kmodel.compile_ode()

I get the following error:
~/Documenten/Gitlab/Skimpy/Local-Skimpy/skimpy/skimpy/analysis/ode/utils.py in (.0)
65 #TODO Throw error if no cell reference compartment is given
66
---> 67 volume_ratios = TabDict([(k,v.compartment.parameters.cell_volume.symbol/
68 v.compartment.parameters.volume.symbol )
69 for k,v in kinetic_model.reactants.items()])

AttributeError: 'NoneType' object has no attribute 'parameters'

Do you know what is going on here?

Kind regards,

Paul

Comment out in mechanisms

Hello Daniel,

It seems this commit with the new mechanism are giving problems with loading the model, are those comments out useful? Could you check? I comment in the code and it works again.
627e2ca

Extension to bioenergetics

I am interested in using SKiMpy to study the interaction of the bioenergetic network (proton pumps, ATPases and associated transporter processes that are powered by the membrane potential/ion motive forces) with the metabolic network. It seems that ion translocation can be represented in this framework by the small molecule modifiers, which I presume automatically accounts for the chemical potentials:

ATPS4rpp:
  enzyme: null
  mechanism:
    class: BiUniReversibleHill
    product: atp_c
    substrate1: pi_c
    substrate2: adp_c
  modifiers:
    DSM_h_c:
      class: DisplacementSmallMoleculeModifier
      mechanism_stoichiometry:
        small_molecule: 3.0
      small_molecule: h_c
    DSM_h_e:
      class: DisplacementSmallMoleculeModifier
      mechanism_stoichiometry:
        small_molecule: -4.0
      small_molecule: h_e
  name: ATPS4rpp

I am wondering if/how the membrane potential is represented as a thermodynamic driver as well as a dynamic variable to be calculated by the model, or if it is not already implemented, whether there is a clear path to doing so.

Tutorials exit with errors

In an unmodified installation of SKiMpy, every tutorial script exits with error when run in the way described in the Docker README, except for python /skimpy/tutorials/basics/tutorial_import_cobra.py.

Full tracebacks are available here. There are a few unique error messages and a couple recurring themes:

FileNotFoundError: [Errno 2] No such file or directory: 'output/****.html'
cobra.exceptions.SolverNotFound: optlang-cplex is not a valid solver interface. Pick from ['glpk_exact', 'glpk', 'scipy'].

The spread of the problem makes me suspect that something is still broken in my installation even after the fixes in #7.

Installing skimpy on Ubuntu 21.10

Hello,

I just wanted to share my solutions for installing skimpy on Ubuntu 21.10 from source.

First of all, using pip install skimpy doesn't work because it points to a different package: aeturrell/skimpy. Installing it from source (pip install -e .) was possible, but only after a bit of struggling with dependencies:

  • I had to install these using the package manager: sudo apt install cython3 gfortran libsundials-dev libflint-dev
  • I had to change the version of sckits.odes to 2.6.3 (latest) in skimpy/setup.py since the indicated version (2.4.1) couldn't be installed on my machine. As far as I can tell, it works well with the newer version.
  • Finally, I'm not 100% sure about this, but installing cython via pip before installing scikits.odes is required since it seems the dependency is not resolved correctly by pip.

After this pip install -e . worked and I managed to run the tests without errors.

load_yaml_model does not seem to load inhibitory mechanisms

Dear Skimpy developers,

I noticed that when adding inhibitory mechanisms to the model, these can be in principle exported with the export_to_yaml function, but not imported with the load_yaml_model(). Is this correct, or is there already something missing in how I add the mechanisms in the mode?

name="Enz_B"
SpecificConvenience = make_generalized_reversible_hill_n_n_h1_with_inhibition([-1, 1,1], [1])
metabolites=SpecificConvenience.Reactants(substrate1='A_c',product1='B_c',product2='pi_c')
inhibitors=SpecificConvenience.Inhibitors(inhibitor1='L_c')
parameters=SpecificConvenience.Parameters(
    vmax_forward=None,
    km_substrate1=None,
    km_product1=None,
    ki_inhibitor1=None)
Enz_B=Reaction(name=name,
                   mechanism=SpecificConvenience,
                   reactants=metabolites,
                   inhibitors=inhibitors,)
Enz_B.modifiers['DSM__h_c']=DisplacementSmallMoleculeModifier("h_c",1)           
kmodel.add_reaction(Enz_B)
kmodel.parametrize_by_reaction({Enz_B.name:parameters})
kmodel.reactants.B_c.compartment=kmodel.compartments.c

I have been using your kinetic modelling package quite a lot, so thank you for this nice package.

Kind regards,

Paul

No module named 'skimpy.nullspace'

Dear developers,

i meet the same error with a closed issue, but i can't solve it until i'm frustrated.
Here is a list of my procedure:
1.install minicoda and execute

conda config --add channels bioconda
conda config --add channels conda-forge
conda config --set channel_priority strict
conda create --name skimpy-env python=3.8
conda activate skimpy-env
conda install -c weilandtd skimpy

one by one
2.create a new python file named test_demo.py at the root directory skimpy/, and copy the Quick start code into it
3. python3 test_demo.py try to run it
4. then the error happened

../skimpy/skimpy/analysis/mca/utils.py", line 47, in <module>
    from skimpy.nullspace import left_integer_nullspace
ModuleNotFoundError: No module named 'skimpy.nullspace'

Is there some important step i missed?Or i need to show more details?

Gao

Failure to import COBRA model

Attempting to import this COBRA model fails:

from cobra.io.json import load_json_model
from skimpy.io.generate_from_cobra import FromCobra

cobra_model = load_json_model("iWFL_1372.json")

model_gen = FromCobra()
skimpy_model = model_gen.import_model(cobra_model)

gives traceback

---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-43-9894a0b4025d> in <module>
----> 1 skimpy_model = model_gen.import_model(cobra_model)

/skimpy/skimpy/io/generate_from_cobra.py in import_model(self, cobra_model)
     77                        and (this_met .id not in self.reactants_to_exclude):
     78                         met = sanitize_cobra_vars(this_met.id)
---> 79                         this_reactant = skimpy_model.reactants[met]
     80                         this_const_met = ConstantConcentration(this_reactant)
     81                         skimpy_model.add_boundary_condition(this_const_met)

KeyError: 'fe3dcit_e'

I believe the problem is that in FromCobra().import_model(), we look up the boundary reaction metabolite this_reactant in skimpy_model.reactants, but this is not guaranteed to exist. It only exists if the metabolite was added in the previous for loop at line 60, i.e. if the metabolite appears in the non-boundary reactions too.

Skimpy.nullspace module missing

Dear developers,

I came accross this package and this is exactly what I need for making models, so first of all thank you!

However, when trying to use the package it seems that skimpy.nullspace is missing. I get the following error when trying to do the simple example provided on the readme:

47 from skimpy.nullspace import left_integer_nullspace
48
49 from ...utils.namespace import *

ModuleNotFoundError: No module named 'skimpy.nullspace'.

I was wondering what I am exactly doing wrong when installing the module.

Kind regards,

Paul

Failure to install from Dockerfile in Windows and WSL2 (Ubuntu 20.04)

I have failed to run SKiMpy following the Docker instructions on both Windows and WSL2 (Ubuntu 20.04 distribution). (I have also failed running it from source code, but I am prepared to accept that is probably my ineptitude rather than a problem with the code or documentation.)

Docker: Windows

Running build.bat seems to work fine, but run.bat leads to docker: invalid reference format.

Docker: WSL2 (Ubuntu-20.04)

I tried building and running the Docker image in a clean installation of the Ubuntu 20.04 distro on Windows Subsystem for Linux. Again . build worked fine, but . run exited with error Failed to build scikits.odes, full message here.

From source

Finally, attempting to install from source on WSL2 following the instructions in #5 failed with a similar if not identical message to above.

(Attempt to install from source on Windows was abandoned because trying to install SUNDIALS was demoralizing.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.