Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
COBREXA.jl
Manage
Activity
Members
Plan
External wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LCSB-BioCore
COBREXA.jl
Commits
a140d45e
Unverified
Commit
a140d45e
authored
2 years ago
by
St. Elmo
Browse files
Options
Downloads
Patches
Plain Diff
format again
parent
6a539373
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/base/utils/enzymes.jl
+1
-1
1 addition, 1 deletion
src/base/utils/enzymes.jl
test/analysis/gecko.jl
+9
-42
9 additions, 42 deletions
test/analysis/gecko.jl
with
10 additions
and
43 deletions
src/base/utils/enzymes.jl
+
1
−
1
View file @
a140d45e
...
...
@@ -24,7 +24,7 @@ Extract the mass utilization in mass groups from a solved [`GeckoModel`](@ref).
protein_mass_group_dict
(
model
::
GeckoModel
,
opt_model
)
=
is_solved
(
opt_model
)
?
Dict
(
grp
[
1
]
=>
dot
(
value
.
(
opt_model
[
:
x
])[
n_reactions
(
model
)
.+
grp
[
2
]],
grp
[
3
])
for
grp
[
1
]
=>
dot
(
value
.
(
opt_model
[
:
x
])[
n_reactions
(
model
)
.+
grp
[
2
]],
grp
[
3
])
for
grp
in
model
.
coupling_row_mass_group
)
:
nothing
...
...
This diff is collapsed.
Click to expand it.
test/analysis/gecko.jl
+
9
−
42
View file @
a140d45e
...
...
@@ -68,10 +68,10 @@ end
"r3"
,
m1
+
m2
→
m3
,
0
,
100
"r4"
,
m3
↔
m4
,
-
100
,
100
# make reversible instead
"r5"
,
m2
↔
m4
,
-
100
,
100
"r6"
,
nothing
→
m4
,
0
,
100
"r6"
,
nothing
→
m4
,
0
,
100
end
gs
=
[
Gene
(
"g
$
i"
)
for
i
in
1
:
4
]
gs
=
[
Gene
(
"g
$
i"
)
for
i
=
1
:
4
]
m
.
reactions
[
"r3"
]
.
grr
=
[[
"g1"
]]
m
.
reactions
[
"r4"
]
.
grr
=
[[
"g1"
],
[
"g2"
]]
...
...
@@ -82,32 +82,10 @@ end
add_metabolites!
(
m
,
[
m1
,
m2
,
m3
,
m4
])
reaction_isozymes
=
Dict
(
"r3"
=>
[
Isozyme
(
Dict
(
"g1"
=>
1
),
1.0
,
1.0
,
),
],
"r4"
=>
[
Isozyme
(
Dict
(
"g1"
=>
1
),
2.0
,
2.0
,
),
Isozyme
(
Dict
(
"g2"
=>
1
),
3.0
,
3.0
,
),
],
"r5"
=>
[
Isozyme
(
Dict
(
"g3"
=>
1
,
"g4"
=>
2
),
5.0
,
5.0
,
),
],
"r3"
=>
[
Isozyme
(
Dict
(
"g1"
=>
1
),
1.0
,
1.0
)],
"r4"
=>
[
Isozyme
(
Dict
(
"g1"
=>
1
),
2.0
,
2.0
),
Isozyme
(
Dict
(
"g2"
=>
1
),
3.0
,
3.0
)],
"r5"
=>
[
Isozyme
(
Dict
(
"g3"
=>
1
,
"g4"
=>
2
),
5.0
,
5.0
)],
)
gene_product_bounds
=
Dict
(
"g1"
=>
(
0.0
,
10.0
),
...
...
@@ -116,16 +94,11 @@ end
"g4"
=>
(
0.0
,
10.0
),
)
gene_product_molar_mass
=
Dict
(
"g1"
=>
1.0
,
"g2"
=>
2.0
,
"g3"
=>
3.0
,
"g4"
=>
4.0
,
)
gene_product_molar_mass
=
Dict
(
"g1"
=>
1.0
,
"g2"
=>
2.0
,
"g3"
=>
3.0
,
"g4"
=>
4.0
)
gene_mass_group_bound
=
Dict
(
"uncategorized"
=>
0.5
)
gm
=
make_gecko_model
(
gm
=
make_gecko_model
(
m
;
reaction_isozymes
,
gene_product_bounds
,
...
...
@@ -133,12 +106,6 @@ end
gene_mass_group_bound
,
)
S
=
stoichiometry
(
gm
)
l
,
u
=
bounds
(
gm
)
coupling
(
gm
)
cl
,
cu
=
coupling_bounds
(
gm
)
opt_model
=
flux_balance_analysis
(
gm
,
Tulip
.
Optimizer
;
...
...
@@ -152,4 +119,4 @@ end
@test
isapprox
(
rxn_fluxes
[
"r4"
],
0.142857
,
atol
=
TEST_TOLERANCE
)
@test
isapprox
(
gene_products
[
"g3"
],
0.0285714
,
atol
=
TEST_TOLERANCE
)
@test
isapprox
(
mass_groups
[
"uncategorized"
],
0.5
,
atol
=
TEST_TOLERANCE
)
end
\ No newline at end of file
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment