-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from MetExplore/development
Version 0.9.0-beta.0
- Loading branch information
Showing
14 changed files
with
116 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
from miom.miom import ( | ||
miom, | ||
PicosModel, | ||
PythonMipModel, | ||
Solvers | ||
from miom.miom import ( | ||
load, | ||
Solvers, | ||
Comparator, | ||
ExtractionMode | ||
) | ||
|
||
from miom.mio import ( | ||
load_gem, | ||
export_gem | ||
) | ||
__all__ = ["load", "Solvers", "Comparator", "ExtractionMode"] | ||
__version__ = "0.9.0-beta.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import argparse | ||
import miom | ||
|
||
def convert_gem(args): | ||
print(f"MIOM v{miom.__version__}") | ||
m = miom.mio.load_gem(args.input) | ||
print(f"Loaded network with {m.num_reactions} reactions") | ||
print(f"Exporting to {args.output}...") | ||
miom.mio.export_gem(m, args.output) | ||
print("Done.") | ||
|
||
def get_args(): | ||
parser = argparse.ArgumentParser(description=f"MIOM: Mixed Integer Optimization for Metabolism") | ||
parser.add_argument( | ||
"--version", | ||
action="version", | ||
version=f"MIOM v{miom.__version__}" | ||
) | ||
subparsers = parser.add_subparsers(help="sub-command help") | ||
convert = subparsers.add_parser("convert", help="Convert a model to miom format") | ||
convert.add_argument( | ||
"input", | ||
help="Input model file (if cobra is installed, any format supported by cobra is allowed)" | ||
) | ||
convert.add_argument( | ||
"output", | ||
help="Output GEM file in MIOM format" | ||
) | ||
convert.set_defaults(func=convert_gem) | ||
return parser.parse_args() | ||
|
||
if __name__ == '__main__': | ||
args = get_args() | ||
if args.func: | ||
args.func(args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "miom" | ||
version = "0.9.0-alpha.4" | ||
version = "0.9.0-beta.0" | ||
description = "Mixed Integer Optimization for Metabolism" | ||
authors = ["Pablo R. Mier <[email protected]>"] | ||
keywords = ["optimization", "LP", "MIP", "metabolism", "metabolic-networks"] | ||
|