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
21a2d7c2
Commit
21a2d7c2
authored
3 years ago
by
Miroslav Kratochvil
Browse files
Options
Downloads
Patches
Plain Diff
format 341 + add a tiny simplification
parent
73e1d547
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/analysis/modifications/optimizer.jl
+4
-2
4 additions, 2 deletions
src/analysis/modifications/optimizer.jl
src/reconstruction/community.jl
+1
-2
1 addition, 2 deletions
src/reconstruction/community.jl
test/analysis/flux_balance_analysis.jl
+12
-20
12 additions, 20 deletions
test/analysis/flux_balance_analysis.jl
with
17 additions
and
24 deletions
src/analysis/modifications/optimizer.jl
+
4
−
2
View file @
21a2d7c2
...
...
@@ -83,13 +83,15 @@ function change_objective(
# Construct objective_indices array
if
typeof
(
new_objective
)
==
String
objective_indices
=
[
first
(
indexin
([
new_objective
],
reactions
(
model
))
)]
objective_indices
=
indexin
([
new_objective
],
reactions
(
model
))
else
objective_indices
=
[
first
(
indexin
([
rxnid
],
reactions
(
model
)))
for
rxnid
in
new_objective
]
end
any
(
isnothing
.
(
objective_indices
))
&&
throw
(
DomainError
(
new_objective
,
"No matching reaction found for one or more ids."
))
any
(
isnothing
.
(
objective_indices
))
&&
throw
(
DomainError
(
new_objective
,
"No matching reaction found for one or more ids."
),
)
# Initialize weights
opt_weights
=
spzeros
(
n_reactions
(
model
))
...
...
This diff is collapsed.
Click to expand it.
src/reconstruction/community.jl
+
1
−
2
View file @
21a2d7c2
...
...
@@ -283,8 +283,7 @@ function join_with_exchanges(
nnz_total
=
sum
(
length
(
first
(
nnz
))
for
nnz
in
nnzs
)
+
length
(
models
)
*
length
(
exchange_rxn_ids
)
+
length
(
exchange_met_ids
)
+
nnz_add
length
(
exchange_met_ids
)
+
nnz_add
n_reactions_metabolic
=
sum
(
reaction_lengths
)
n_reactions_total
=
n_reactions_metabolic
+
length
(
exchange_rxn_ids
)
+
column_add
n_metabolites_metabolic
=
sum
(
metabolite_lengths
)
...
...
This diff is collapsed.
Click to expand it.
test/analysis/flux_balance_analysis.jl
+
12
−
20
View file @
21a2d7c2
...
...
@@ -69,28 +69,20 @@ end
)
@test_throws
DomainError
flux_balance_analysis_dict
(
model
,
Tulip
.
Optimizer
;
modifications
=
[
change_constraint
(
"gbbrsh"
,
-
12
,
-
12
)
],
)
model
,
Tulip
.
Optimizer
;
modifications
=
[
change_constraint
(
"gbbrsh"
,
-
12
,
-
12
)],
)
@test_throws
DomainError
flux_balance_analysis_dict
(
model
,
Tulip
.
Optimizer
;
modifications
=
[
change_objective
(
"gbbrsh"
)
],
)
model
,
Tulip
.
Optimizer
;
modifications
=
[
change_objective
(
"gbbrsh"
)],
)
@test_throws
DomainError
flux_balance_analysis_dict
(
model
,
Tulip
.
Optimizer
;
modifications
=
[
change_objective
(
[
"BIOMASS_Ecoli_core_w_GAM"
;
"gbbrsh"
]
)
],
)
model
,
Tulip
.
Optimizer
;
modifications
=
[
change_objective
([
"BIOMASS_Ecoli_core_w_GAM"
;
"gbbrsh"
])],
)
end
@testset
"Flux balance analysis with CoreModelCoupled"
begin
...
...
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