Giter Site home page Giter Site logo

kbaseapps / cobrapybasedfba Goto Github PK

View Code? Open in Web Editor NEW
1.0 9.0 2.0 519 KB

Wrapper of COBRApy FBA functions in KBase replacing some functionality in the fba_tools module

License: MIT License

Ruby 0.50% Dockerfile 0.35% Makefile 0.60% Python 96.46% Shell 0.18% HTML 1.90%

cobrapybasedfba's Introduction

COBRApyBasedFBA

This is a KBase module generated by the KBase Software Development Kit (SDK).

You will need to have the SDK installed to use this module. Learn more about the SDK and how to use it.

You can also learn more about the apps implemented in this module from its catalog page or its spec file.

Setup and test

Add your KBase developer token to test_local/test.cfg and run the following:

$ make
$ kb-sdk test

After making any additional changes to this repo, run kb-sdk test again to verify that everything still works.

Installation from another module

To use this code in another SDK module, call kb-sdk install COBRApyBasedFBA in the other module's root directory.

Help

You may find the answers to your questions in our FAQ or Troubleshooting Guide.

cobrapybasedfba's People

Contributors

braceal avatar cshenry avatar fxe avatar

Stargazers

 avatar

Watchers

James Cloos avatar Shane Canon avatar Steve Chan avatar  avatar Bill Riehl avatar  avatar Paramvir avatar Qizhi Zhang avatar  avatar

Forkers

bio-boris fxe

cobrapybasedfba's Issues

Error from COBRApyBasedFBA_server_test.py

Error output

======================================================================
ERROR: Failure: KeyError ('getpwuid(): uid not found: 1000')
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/miniconda/lib/python3.6/site-packages/nose/failure.py", line 39, in runTest
    raise self.exc_val.with_traceback(self.tb)
  File "/miniconda/lib/python3.6/site-packages/nose/loader.py", line 418, in loadTestsFromName
    addr.filename, addr.module)
  File "/miniconda/lib/python3.6/site-packages/nose/importer.py", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/miniconda/lib/python3.6/site-packages/nose/importer.py", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/miniconda/lib/python3.6/imp.py", line 235, in load_module
    return load_source(name, filename, file)
  File "/miniconda/lib/python3.6/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 684, in _load
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/kb/module/test/COBRApyBasedFBA_server_test.py", line 18, in <module>
    from COBRApyBasedFBA.COBRApyBasedFBAServer import MethodContext
  File "/kb/module/lib/COBRApyBasedFBA/COBRApyBasedFBAServer.py", line 490, in <module>
    application = Application()
  File "/kb/module/lib/COBRApyBasedFBA/COBRApyBasedFBAServer.py", line 334, in __init__
    config=get_config_file())
  File "/kb/deployment/lib/biokbase/log.py", line 137, in __init__
    self.user = _getpass.getuser()
  File "/miniconda/lib/python3.6/getpass.py", line 169, in getuser
    return pwd.getpwuid(os.getuid())[0]
KeyError: 'getpwuid(): uid not found: 1000'

@Fxe Let me know what you think of this

Add option for cplex solver.

Currently supported solvers are GLPK and COINOR-CBC. This can be handled with a dropdown UI menu.
This is easy to do because these are both open source solvers.

Adding a cplex option may be more complicated because it requires the user confirming a cplex license on kbase.

Custom cobrapy/optlang dependency

We need to add the forked versions of cobrapy and optlang that contain the COINOR-CBC and OSQP solvers.

This was the way that I installed them for testing. We can probably run the installs for optlang and cobrapy without the -e flag.
@Fxe what is the best way to add this to the docker image?

git clone https://github.com/braceal/MFApy.git
cd MFApy
python3 -m venv env
source env/bin/activate
pip install --upgrade pip setuptools wheel
mkdir deps && cd deps
git clone https://github.com/braceal/optlang.git
cd optlang && git checkout test/coinor-cbc_osqp && cd ..
git clone https://github.com/braceal/cobrapy.git
cd cobrapy && git ceckout feature/coinor-cbc_osqp && cd ..
pip install -e optlang/
pip install -e cobrapy/
cd .. && pip install -e .

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.