Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 27 07:17
  • Oct 12 15:04

    phantomas1234 on 0.13.5

    (compare)

  • Oct 12 14:59

    phantomas1234 on devel

    chore: don't forget to build pa… (compare)

  • Oct 12 14:39

    phantomas1234 on 0.13.4

    (compare)

  • Oct 12 14:24

    phantomas1234 on devel

    chore: use official pypi GH act… (compare)

  • Oct 12 13:57
    carrascomj commented #286
  • Oct 12 13:49
    matthiaskoenig opened #286
  • Oct 12 13:44

    phantomas1234 on 0.13.3

    (compare)

  • Oct 12 13:29

    phantomas1234 on devel

    Skip more pickle problems (compare)

  • Oct 12 12:16

    phantomas1234 on devel

    Skip problematic pickling probl… (compare)

  • Oct 12 08:35

    phantomas1234 on 0.13.2

    (compare)

  • Oct 12 08:32
    phantomas1234 commented #285
  • Oct 12 08:32

    phantomas1234 on devel

    fix: set explicitly the auth to… (compare)

  • Oct 12 08:32
    phantomas1234 closed #285
  • Oct 07 09:34
    codecov[bot] commented #285
  • Oct 07 09:33
    codecov[bot] commented #285
  • Oct 07 09:31
    codecov[bot] commented #285
  • Oct 07 09:21
    carrascomj opened #285
  • Oct 07 09:18

    carrascomj on fix-twine-upload

    fix: set explicitly the auth to… (compare)

  • Oct 07 09:04

    carrascomj on fix-twine-upload

    (compare)

Astrid-42
@Astrid-42
Many thanks, that's very kind of you. I use the newest consensus model for yeast: yeast7.6.
João Gonçalo Rocha Cardoso
@joaocardoso
Hi @Astrid-42! What is "r_4054"? When I load the yeast model I cannot find it in the reactions or metabolites
Astrid-42
@Astrid-42
Hi @joaocardoso, thanks for looking at it! I added a linear heterologous reactions (as well as metabolites). FBAs worked fine so far, so I expected them to not interfere in an unexpected way with the model.
Unfortunately I have to leave work right now, but please feel free to send any further questions, I will answer them tmr morning and would be delighted to find out why OptKnock and OptGene fail here!
Astrid-42
@Astrid-42
Did you come up with any idea why OptKnock and OptGene can't run?
Nikolaus Sonnenschein
@phantomas1234
Astrid, did you add sink reactions for the metabolites in the heterologous reaction?
Astrid-42
@Astrid-42
Yes. The linearly produced substance has a sink reaction "r_4054: product --> ". No other substances are produced without being consumed by another reaction, only FAD/FADH2 and NADP(+)/NADPH (already existing in the model) are produced/used without a source/sink reaction for them.
Astrid-42
@Astrid-42
Hi @phantomas1234 @joaocardoso ,
I would be really glad about some ideas on why the OptKnock algorithm doesn't work!
My input:
‘optknock = OptKnock(model, fraction_of_optimum=0.00001, use_nullspace_simplification=False)’
The output is a long error message ending with
‘ solver status is 'infeasible' ‘

The full error message is as follows:
'---------------------------------------------------------------------------
OptimizationError Traceback (most recent call last)

<ipython-input-5-443fb185c4d9> in <module>()
----> 1 optknock = OptKnock(model, fraction_of_optimum=0.00001, use_nullspace_simplification=False) ## ???

/Users/astridstubbusch/anaconda/envs/py2/lib/python2.7/site-packages/cameo/strain_design/deterministic/linear_programming.pyc in init(self, model, exclude_reactions, remove_blocked, fraction_of_optimum, exclude_non_gene_reactions, use_nullspace_simplification, args, *kwargs)
113 exclude_reactions += [r for r in self._model.reactions if not r.genes]
114
--> 115 self._build_problem(exclude_reactions, use_nullspace_simplification)
116
117 def _remove_blocked_reactions(self):

/Users/astridstubbusch/anaconda/envs/py2/lib/python2.7/site-packages/cameo/strain_design/deterministic/linear_programming.pyc in _build_problem(self, essential_reactions, use_nullspace_simplification)
132 logger.debug("Starting to formulate OptKnock problem")
133
--> 134 self.essential_reactions = find_essential_reactions(self._model).union(self._model.exchanges)
135 if essential_reactions:
136 self.essential_reactions.update(set(get_reaction_for(self._model, r) for r in essential_reactions))

/Users/astridstubbusch/anaconda/envs/py2/lib/python2.7/site-packages/cobra/flux_analysis/variability.pyc in find_essential_reactions(model, threshold)
345 Set of essential reactions
346 """
--> 347 solution = model.optimize(raise_error=True)
348 tolerance = model.solver.configuration.tolerances.feasibility
349 non_zero_flux_reactions = list(

/Users/astridstubbusch/anaconda/envs/py2/lib/python2.7/site-packages/cobra/core/model.pyc in optimize(self, objective_sense, raise_error, **kwargs)
890 objective_sense, original_direction)
891 self.slim_optimize()
--> 892 solution = get_solution(self, raise_error=raise_error)
893 self.objective.direction = original_direction
894 return solution

/Users/astridstubbusch/anaconda/envs/py2/lib/python2.7/site-packages/cobra/core/solution.pyc in get_solution(model, reactions, metabolites, raise_error)
286 legacy solvers.
287 """
--> 288 check_solver_status(model.solver.status, raise_error=raise_error)
289 if reactions is None:
290 reactions = model.reactions

/Users/astridstubbusch/anaconda/envs/py2/lib/python2.7/site-packages/cobra/util/solver.pyc in check_solver_status(status, raise_error)
422 "model was not optimized yet or solver context switched")
423 else:
--> 424 raise OptimizationError("solver status is '{}'".format(status))
425
426

OptimizationError: solver status is 'infeasible' '

João Gonçalo Rocha Cardoso
@joaocardoso
What solver are you using?
Astrid-42
@Astrid-42
Thanks for the reply! I use CPLEX.
Nikolaus Sonnenschein
@phantomas1234
@sgalkina can you help Astrid with this? @Astrid-42 can you please create an issue on the cameo issue tracker and upload model and code so that we can try to reproduce the problem? https://github.com/biosustain/cameo/issues
Astrid-42
@Astrid-42
@phantomas1234 Many thanks! @sgalkina I created an issue with the name 'OptKnock error' and attached both model and code. Thanks a lot for your help!
João Gonçalo Rocha Cardoso
@joaocardoso
@Astrid-42: regarding your problem with OptGene. One thing you did was to set the biomass as a metabolite. In COBRA models (like iJO1366 or iMM904) there is no biomass metabolite. The variables of the model are reactions. You can set the 'r_2111' as biomass given the constitution of the model, it will serve it's purpose.
Regarding OptKnock, I am still trying to reproduce your error
A few notes on that model
it has 3493 reactions, of which 1513 are coupled.
if you run OptKnock without the null space simplification it will take a very long time, it it works at all
João Gonçalo Rocha Cardoso
@joaocardoso
the null space simplification will reduce those 1513 reactions to ~500 variables
I left OptKnock building the problem on my computer, I'll update you when I have news
Astrid-42
@Astrid-42
@joaocardoso Many many thanks for having a look!
-for OptGene: I tried with the biomass reaction first, then tried with the metabolite (I understood that both is possible). But it didn't solve the problem.
-for OptKnock: I tried with the simplification at first of course, but it seemed to abort with an error in the middle of doing some simplifications of the model. Therefore we tried to switch that off, but both didn't work sadly.
Many thanks, please keep me in the loop! It would be great if you could understand the problem.
João Gonçalo Rocha Cardoso
@joaocardoso
@Astrid-42 I managed to reproduce your error. I’ll explore a solution soon. I am attending a conference today and tomorrow and I’ll try a few different things on Monday when I am back in the office
Astrid-42
@Astrid-42
@joaocardoso Thanks a lot, good to know you get the same error and I would be very happy to hear back from you next week. Much fun at the conference!
Astrid-42
@Astrid-42
@joaocardoso Any solution yet? My deadline is actually Thursday, do you think there is a chance to get cameo to run by then? I would be really happy to know why OptKnock/-Gene don't work. Many thanks!
João Gonçalo Rocha Cardoso
@joaocardoso
Hi @Astrid-42! Unfortunately I have been sick in bed for the past few days. I gave some though and I think your fraction_of_optimum can be the problem. I’ll test it myself, but you are setting the model objective to be a number below the solver precision and that’s usually recipe for disaster. I’ll be back in the office tomorrow and I will try to assess that myself.
Astrid-42
@Astrid-42
Hey @joaocardoso , I am sorry to hear you were sick, hopefully you feel totally fit again soon! I set the fraction_of_optimum very low to see if with very very low requirements I could avoid the "unfeasible solution" error, but as you see it didn't help. I did not think of disaster-associated below-solver-precision issues, very good advice :smile: But unfortunately, also with fraction_of_optimum=0.1 or = 0.01 I still get an error, "solver status is 'infeasible'".
João Gonçalo Rocha Cardoso
@joaocardoso
Hi @Astrid-42. I already verified that. I am trying to find out where things changed. So far I can run the find_essential_reactionsmethod outside of OptKnock and it does not crash.
João Gonçalo Rocha Cardoso
@joaocardoso
I think I finally found the problem. The biomass reaction contains metabolites with stoichiometric coefficients at the solver precision s_0509 and s_3714
when you use OptKnock it increases the solver precision to 1e-8 (1e-6 is the default precision) and the biomass r_4041 becomes invalid
Two solutions: 1. remove those from the biomass, 2. use an alternative biomass (r_2133 or r_2110)
Astrid-42
@Astrid-42
@joaocardoso Thanks a lot! Sounds promising! Stupid question for solution two: How can I change the biomass reaction for the OptKnock( ...) command? I can not find an argument for that?
João Gonçalo Rocha Cardoso
@joaocardoso
You change the bounds of the original biomass equation r_4041 to zero and the upper bound of one of this (r_2133 or r_2110) to 1000
Astrid-42
@Astrid-42
Hi @joaocardoso ! I tried what you suggested, but with r_4041 and r_2133 set to zero and only using r_2110 (no boundaries) ...
optknock = OptKnock(model, fraction_of_optimum=0.1, use_nullspace_simplification=False)
works fine, but when running ...
result = optknock.run(max_knockouts=3,
target='r_4054',
biomass='r_2110')
I get the error KeyError: 'r_2110'. Same if I replace biomass='r_2110' with biomass='r_2111' or biomass='s_0450'.
João Gonçalo Rocha Cardoso
@joaocardoso
ok, I'll check that quickly
Nikolaus Sonnenschein
@phantomas1234
@Astrid-42 what version of CPLEX are you using? Working on a different model that lead to an infeasibility, I discovered that after upgrading to CPLEX 12.7.1 the problem disappeared.
Snorre Sulheim
@sulheim
Is it possible to parallelize optknock in Cameo?
Kristian Jensen
@KristianJensen
Some solvers (e.g. cplex) will be able to run the MILP optimization multithreaded, but apart from that the algorithm is not parallelizable
Snorre Sulheim
@sulheim
okey, so as long as I use cplex all available cores will be utilized, or how do I soecify this for CPLEX?
Kristian Jensen
@KristianJensen
Snorre Sulheim
@sulheim
Thanks, @KristianJensen . It is just that I try to run it on one node of a HPC-platform, and I am not impressed by the speed :(
Snorre Sulheim
@sulheim
Is it a bug in OptKnock? the default value is 'exclude_non_gene_reactions=True', however it still suggests to knock out some exchange reactions
Kristian Jensen
@KristianJensen
That should not happen. Can you paste the output you get?
Snorre Sulheim
@sulheim
Among other suggested knockouts I get EX_nh4_e
Snorre Sulheim
@sulheim
When I run OptKnock with Cameo I results where the minimal flux of the target reaction is 0, but I only want the non-zero results. Any Ideas? Matlab provide these results
Kristian Jensen
@KristianJensen
@sulheim OptKnock optimizes the maximum flux of the target reaction under optimal growth, without regard to the minimum flux of the target. If you generate many different designs with OptKnock it might be that some of them have a non-zero minimal flux. If this is not the case you can have a look a RobustKnock which specifically optimizes the minimal flux of the target. However this is not implemented in cameo
ACab
@ACabbia
Hi all, I am trying to compute Elementary Flux Modes (EFMs) with the function MinimalCutSetsEnumerator from cameo.flux_analysis.structural , but I still can't understand what's the correct input for the targets argument, can anyone clarify? Thanks!