Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 19 16:37
    cdiener labeled #1014
  • Oct 19 16:37
    cdiener closed #1014
  • Oct 19 16:37
    cdiener commented #1014
  • Oct 19 14:04
    rcolpo edited #1014
  • Oct 19 13:57
    rcolpo edited #1014
  • Oct 19 13:56
    rcolpo opened #1014
  • Oct 15 23:32
    matthiaskoenig commented #1013
  • Oct 15 23:14
    Midnighter commented #1012
  • Oct 15 22:45
    cdiener commented #1012
  • Oct 15 13:01
    Midnighter commented #1013
  • Oct 15 00:24
    codecov-io commented #1013
  • Oct 15 00:20
    codecov-io commented #1013
  • Oct 15 00:18
    codecov-io commented #1013
  • Oct 15 00:18
    codecov-io commented #1013
  • Oct 15 00:17
    codecov-io commented #1013
  • Oct 15 00:16
    codecov-io commented #1013
  • Oct 15 00:10
    akaviaLab opened #1013
  • Oct 14 22:34
    Midnighter labeled #1012
  • Oct 14 22:34
    Midnighter labeled #1012
  • Oct 14 19:26
    cdanielmachado opened #1012
Mattia Gollub
@dotPiano_gitlab
The time seems to scale linearly with the number of cores, so I think it's really the overhead of spawning the process and loading the model the first time.
Christian Diener
@cdiener
It's unlikely the same issue but might make sense to check your antivirus: https://stackoverflow.com/questions/49817726/python-3-6-multiprocessing-pool-very-slow-to-start-using-windows
Moritz E. Beber
@Midnighter

But I think there are also some inefficiencies in how the FVA is managed that can lead to not using the previous solution basis.

What improvements do you have in mind? Each process gets a global model object which is used to solve N problems. So the previous solutions should be used. We also run all minimizations in one batch and all maximizations in another batch. So that seems like a decent implementation to me.

I see now that we start a new process pool for each objective direction which is probably why you saw four models being copied @dotPiano_gitlab. So that's something that can be improved.
Christian Diener
@cdiener
I am not sure if that is true for all process spawning models. I know we set the chunksize but there is no guarantee the process does not reinitialize within a chunk and that would reset the solver since model copying and pickling triggers a full reset. Also since you split it up over many processes and every process starts with a fresh solver object there is a little less solution recycling (one less for every process) which factors into start up time. Since using the previous basis can make this 10-100x faster solving relatively few optimization in one chunk can be less efficient then running them all serially. I don't think we can improve anything here but using many processes will inherently be only useful if you solve hundreds to thousands of optimizations or when you need to get the full solution object (which is slower then solving the model).
Moritz E. Beber
@Midnighter
Hmm, good points. I guess we should make the benchmarking part of the standard CI since we can now target Linux, Mac, and Windows.
Christian Diener
@cdiener
This is a good idea. We could make an extra action for that (and probably have it use symengine by default).
Bruno Pereira
@BrunoMiguelPereira
Hello, my name is Bruno Pereira and I'm from Portugal! I'm new to cobrapy and i'm using it to test the examples of the tool "gim3e". They use cobrapy 0.2.* where there is a function called "iniatialize_growth_medium" from cobra.manipulation.modify. I saw that this function was removed in the following versions of cobra. Are there functions in the recent versions of the package that can do the same task as this one?
Moritz E. Beber
@Midnighter
Hi @BrunoMiguelPereira have a look at the documentation on working with the medium in the latest cobrapy here https://cobrapy.readthedocs.io/en/latest/media.html Also, what tool are you talking about exactly? There is an implementation of gim3e that should work with modern cobrapy here https://github.com/opencobra/driven/blob/devel/src/driven/omics/gim3e.py
Christian Diener
@cdiener
@BrunoMiguelPereira This package has last been updated 2015 so it's unlikely to work even if you can fix the medium part...
Bruno Pereira
@BrunoMiguelPereira
The tool I was talking about was https://github.com/brianjamesschmidt/gim3e/tree/master/gim3e which has not been updated since 2015, as @cdiener said. The updates done in 2015 were not in accordance to cobra updates because they would have changed the commented parts in the examples. I will try with the "gim3e" that @Midnighter provided and work out the medium somehow. Thank you for the feedback!
Bruno Pereira
@BrunoMiguelPereira
Can I use Driven https://github.com/opencobra/driven/tree/devel to integrate transcriptomic and metabolomic data? I think it is a more up-to-date tool that can solve my problem of integrating both types of data.
Moritz E. Beber
@Midnighter
@BrunoMiguelPereira overall driven is not in the best of shape and hasn't had an official release in a while. However, transcriptomic data should be fine. Metabolomic data I'm not sure about at the moment.
Bruno Pereira
@BrunoMiguelPereira
@Midnighter Thank you for your attention. I will try to get devel branch files in order to get the later version.
Moritz E. Beber
@Midnighter
@matthiaskoenig would you be able to make a PyPI release for python-libsbml-experimental 5.18.3? I need to make a cobrapy release that depends on the same version as the one available on conda-forge in order to proceed with the conda-forge cobrapy package.
Mattia Gollub
@dotPiano_gitlab

I see now that we start a new process pool for each objective direction which is probably why you saw four models being copied @dotPiano_gitlab. So that's something that can be improved.

If I understand correctly, the issue lies in moving data between multiple processes. Why did you opt for multiprocessing rather than multithreading? In the latter copying the models would be much faster.

Moritz E. Beber
@Midnighter
Multithreading doesn't make sense in Python with CPU bound tasks because of the global interpreter lock (GIL).
Moritz E. Beber
@Midnighter
Overall, I'm very happy with the performance on Mac and Linux. So I'd rather look into ways to improve on Windows.
Mattia Gollub
@dotPiano_gitlab
Oh right, I forgot that. Yes, I agree that this is a Windows only problem, still it would be nice to improve the current runtime :) I did some profiling and opened an issue with some ideas (mainly what you guys already suggested): opencobra/cobrapy#997
Greg Medlock
@gregmedlock
Has anyone been working with new modelseed reconstructions lately? It looks like they switched back to explicitly defining boundary metabolites, so reconstructions end up with a couple hundred extra reactions... I'm guessing it's motivated by a push for microbial community modeling, where the explicitly defined boundary is necessary to look at individual species vs. community fluxes, but this is an odd default decision for individual reconstructions. It's bit frustrating that major changes like this aren't publicized or documented (that I can find). Eager to hear the scoop if anyone has it...
Moritz E. Beber
@Midnighter
Don't know anything about those changes I'm afraid. Would love to hear about it, too. Maybe open an issue on their SBML parser?
Christian Diener
@cdiener
Might be the same thing as #992 and #811. The handling of boundary metabolites in cobrapy was changed recently so you might only see it now...
Greg Medlock
@gregmedlock
It's definitely a modelseed change--they now have metabolites and reactions with a _b suffix which hasn't been the case for at least 5 years. Cobrapy handles it beautifully though!
Greg Medlock
@gregmedlock
@Midnighter is their SBML parser in a separate repository from other tools? E.g., there's nothing in https://github.com/ModelSEED
Moritz E. Beber
@Midnighter
I was thinking https://github.com/kbase might have something but a quick search hasn't turned up anything either. I can send a quick introductory email if you like, they've always been very responsive. Or maybe you have already corresponded in the past.
Moritz E. Beber
@Midnighter
@gregmedlock this seems like a relevant issue? Fxe/cobrakbase#3
2 replies
Christian Diener
@cdiener
Should we open the opencobra repos (cobrapy, optlang, etc) for Hacktoberfest @Midnighter ?
Moritz E. Beber
@Midnighter
Go for it!
Although I've heard people get a lot of spam pull requests.
Christian Diener
@cdiener
Hmm, thee is an alternative route where we only label valid PRs with hacktoberfest-accepted this way you don't have to add it to the full repo.
Moritz E. Beber
@Midnighter
:+1:
Bruno Pereira
@BrunoMiguelPereira
Hello, my name is Bruno from Portugal and i am trying to integrate both transcriptomic and metabolomic data in a model. I addressed you before regarding gim3e package (not working due to unmaintenance) and know i am addressing you due to your function "gim3e.py" from package driven. My problem is when the turnover metabolites are added to the reactions which makes the solver status infeasible. The model is the latest Escherichia coli str. K-12 substr. MG1655, iML1515 and the omics data are subsets of the original with the correct translation to model genes and metabolites. I can provide those files if needed. I don't understand why the need to create turnover metabolites for all the metabolites in the model and not only the ones that come from metabolomics. I also tried to use a less complex model, with fewer genes/reactions/metabolites but the infeasible problem happens in the same point.
4 replies
Ben Strain
@BenStrain9_twitter
Hi, I am having trouble installing cobra on my new machine. When using pip install cobra it errors saying
ERROR: Could not find a version that satisfies the requirement python-libsbml-experimental==5.18.3 (from versions: 5.9.2, 5.10.0, 5.10.1, 5.10.2, 5.11.0, 5.11.2, 5.11.4, 5.11.6, 5.12.1, 5.13.0, 5.13.1, 5.14.0, 5.15.0, 5.15.2, 5.16.0, 5.17.0, 5.17.2, 5.18.0, 5.18.1)
ERROR: No matching distribution found for python-libsbml-experimental==5.18.3
I have tried installing python-libsbml-experimental==5.18.3 directly but get the same error. I have ython-libsbml-experimental==5.18.1 installed but this does not help fix cobra installation
I noticed python-libsbml-experimental==5.18.3 was released fairly recently, please may advise on how to fix this
Moritz E. Beber
@Midnighter
Hey @BenStrain9_twitter, what operating system and Python version are you using?
Matthias K├Ânig
@matthiaskoenig
5.18.3 was not released on all platforms. If you can install 5.18.1 everything will work. Cobrapy should only depend on 5.18.1
Moritz E. Beber
@Midnighter
I made a new release which requires 5.18.3 because I wanted to also make a conda-forge package.
Ben Strain
@BenStrain9_twitter
Hi, thanks for your quick reply! I maned to get around this error by installing the previous version of cobra. Even when I force installed the python-libsbml-experimental version 5.18.1 the most recent version of cobra would not work, and I was not able to install 5.18.3 at all (I presume because I am using a windows operating system). I guess this is a potential bug for windows users who are trying to use pip install cobra?
Moritz E. Beber
@Midnighter
Are you using Python 3.9? There are wheels available for all relevant other Python versions https://pypi.org/project/python-libsbml-experimental/#files However, the source distribution is missing but I think building libsbml from sources would just lead you to more trouble.
Ben Strain
@BenStrain9_twitter
I am using 3.8, could this be my issue?
Sanzhar Naizabekov
@ensakz
Hi, I just wanted to ask you guys, how do you manipulate with models from modelSEED since they have different IDs which seem to be less straightforward in comparison with model from BiGG for example? The reaction IDs for example look like rxn00974
Sanzhar Naizabekov
@ensakz
Do you use this website (https://modelseed.org/) and try to refer to the ModelSEED models using it? I have to make central carbon metabolism pathways in 2 models, one is BiGG-based, the second one is ModelSEED-based.
Moritz E. Beber
@Midnighter
Hello @ensakz, models created from modelSEED are typically well annotated. So you should typically be able to find a BiGG identifier, i.e., check model.reactions.rxn00974.annotation for a BiGG identifier. You could then simply rename the IDs of your reactions, compartments, and metabolites so that you might be able to use the same map?
Moritz E. Beber
@Midnighter
@BenStrain9_twitter were you able to figure out the problem?
Sanzhar Naizabekov
@ensakz
@Midnighter thank you for the suggestion. Unfortunately, my model is not annotated. Do you know any software for modelSEED model annotation? Or I just can annotate modelSEED model using other modelSEED models?
Moritz E. Beber
@Midnighter
You could use the latest modelSEED database itself https://github.com/ModelSEED/ModelSEEDDatabase/blob/master/Biochemistry/reactions.json you would just have to ask them if the reaction identifiers are still the same as for your model.
Sanzhar Naizabekov
@ensakz
@Midnighter I got it! I will try it
Moritz E. Beber
@Midnighter
(Similarly for metabolites and compartments.) Just open an issue, they are usually quite responsive.