Commit 59e6f36d authored by St. Elmo's avatar St. Elmo
Browse files

updated code

parent 4d550eb5
......@@ -28,6 +28,7 @@ PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
SBML = "e5567a89-2604-4b09-9718-f5f78e97c3bb"
SBML_jll = "bb12108a-f4ef-5f88-8ef3-0b33ff7017f1"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
......
......@@ -24,11 +24,11 @@ To install this package: `] add CobraTools`.
- [X] pFBA
- [ ] MOMA
- [ ] FVA
- [ ] Implement sampling
- [x] Implement sampling
- [ ] Single gene knockouts
- [ ] Double gene knockout
- [ ] Model construction tools
- [ ] Gibbs integration
- [x] Gibbs integration
- [ ] Distributed analysis (COBRA.jl integration?)
## Usage
......
using CobraTools
using LightGraphs
using Compose
using GraphPlot
......@@ -8,8 +8,6 @@ Note, when importing JSON models only reactions, metabolites, genes and id are u
Note, when importing Matlab models only rxns, metCharge, lb, metNames, S, grRules,
genes, description, rxnNames, ub, metFormulas, b, subSystems, mets and c are used.
Note, SBML is not implemented yet.
"""
function read_model(file_location)
if endswith(file_location, ".json")
......@@ -22,7 +20,6 @@ function read_model(file_location)
elseif endswith(file_location, ".xml")
try
model = reconstruct_model_sbml(file_location)
@warn "Not implemented!"
catch err
@error "SBML model reading error.\n$err"
model = Model()
......@@ -140,8 +137,15 @@ function reconstruct_model_matlab(file_location)
return Model(model_id, rxns, mets, genes, grrs)
end
function reconstructmodelsbml(file_location)
return Model()
function reconstruct_model_sbml(file_location)
m = readSBML(file_location)
# m is now a Model structure with:
# m.reactions
# m.species
# m.compartments
# return Model()
return m
end
"""
......
using CobraTools
using SBML
modelpath = joinpath("models", "iMM904.xml") # doesn' work
modelpath = joinpath("models", "iJO1366.xml") # doesn't work
modelpath = joinpath("models", "e_coli_core.xml") # doesn't work
modelpath = joinpath("models", "Ec_core_flux1.xml") # works
model = readSBML(modelpath)
modelpath = joinpath("models", "iAF1260.xml")
modelpath = joinpath("models", "yeastGEM.xml")
model = CobraTools.read_model(modelpath)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment