Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
COBREXA.jl
Commits
6b5ae65f
Unverified
Commit
6b5ae65f
authored
Sep 10, 2021
by
Miroslav Kratochvil
🚴
Committed by
GitHub
Sep 10, 2021
Browse files
Merge pull request #452 from LCSB-BioCore/mk-fix-rm-metabolites
fix the index in remove_metabolites of CoreModel
parents
e57c592e
b4e8a9e9
Pipeline
#46905
passed with stages
in 31 minutes and 29 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/reconstruction/CoreModel.jl
View file @
6b5ae65f
...
@@ -402,7 +402,7 @@ end
...
@@ -402,7 +402,7 @@ end
model
,
model
,
[
[
ridx
for
ridx
in
1
:
n_reactions
(
model
)
if
ridx
for
ridx
in
1
:
n_reactions
(
model
)
if
any
(
in
.
(
findnz
(
model
.
S
[
:
,
ridx
])[
2
],
Ref
(
metabolite_idxs
)))
any
(
in
.
(
findnz
(
model
.
S
[
:
,
ridx
])[
1
],
Ref
(
metabolite_idxs
)))
],
],
)
)
mask
=
.!
in
.
(
1
:
n_metabolites
(
model
),
Ref
(
metabolite_idxs
))
mask
=
.!
in
.
(
1
:
n_metabolites
(
model
),
Ref
(
metabolite_idxs
))
...
...
test/reconstruction/CoreModel.jl
View file @
6b5ae65f
...
@@ -220,10 +220,10 @@ end
...
@@ -220,10 +220,10 @@ end
m3
=
remove_metabolites
(
model
,
Int
.
(
indexin
([
"glc__D_e"
,
"for_c"
],
metabolites
(
model
))))
m3
=
remove_metabolites
(
model
,
Int
.
(
indexin
([
"glc__D_e"
,
"for_c"
],
metabolites
(
model
))))
m4
=
remove_metabolite
(
model
,
first
(
indexin
([
"glc__D_e"
],
metabolites
(
model
))))
m4
=
remove_metabolite
(
model
,
first
(
indexin
([
"glc__D_e"
],
metabolites
(
model
))))
@test
size
(
stoichiometry
(
m1
))
==
(
70
,
22
)
@test
size
(
stoichiometry
(
m1
))
==
(
70
,
90
)
@test
size
(
stoichiometry
(
m2
))
==
(
71
,
22
)
@test
size
(
stoichiometry
(
m2
))
==
(
71
,
93
)
@test
size
(
stoichiometry
(
m3
))
==
(
70
,
22
)
@test
size
(
stoichiometry
(
m3
))
==
(
70
,
90
)
@test
size
(
stoichiometry
(
m4
))
==
(
71
,
22
)
@test
size
(
stoichiometry
(
m4
))
==
(
71
,
93
)
@test
all
((
!
in
(
metabolites
(
m1
)))
.
([
"glc__D_e"
,
"for_c"
]))
@test
all
((
!
in
(
metabolites
(
m1
)))
.
([
"glc__D_e"
,
"for_c"
]))
@test
!
([
"glc__D_e"
]
in
metabolites
(
m2
))
@test
!
([
"glc__D_e"
]
in
metabolites
(
m2
))
@test
all
((
!
in
(
metabolites
(
m3
)))
.
([
"glc__D_e"
,
"for_c"
]))
@test
all
((
!
in
(
metabolites
(
m3
)))
.
([
"glc__D_e"
,
"for_c"
]))
...
...
cylon-x
🤖
@cylon-x
mentioned in commit
fb2a81a5
·
Sep 10, 2021
mentioned in commit
fb2a81a5
mentioned in commit fb2a81a5933f1376c6fe3445a566586ff24ea2ae
Toggle commit list
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment