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
e1c5f179
Unverified
Commit
e1c5f179
authored
Jan 25, 2022
by
Miroslav Kratochvil
🚴
Committed by
GitHub
Jan 25, 2022
Browse files
Merge pull request #564 from LCSB-BioCore/mk-grr-underscores
GRR IDs may contain underscores
parents
906477b9
c43d883e
Pipeline
#51590
passed with stages
in 20 minutes and 16 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/base/utils/gene_associations.jl
View file @
e1c5f179
...
...
@@ -62,7 +62,7 @@ function _parse_grr_to_sbml(str::String)::Maybe{SBML.GeneProductAssociation}
toks
=
String
[]
m
=
Nothing
while
!
isnothing
(
begin
m
=
match
(
r
"( +|[a-zA-Z0-9]+|[^ a-zA-Z0-9()]+|[(]|[)])(.*)"
,
s
)
m
=
match
(
r
"( +|[a-zA-Z0-9
_
]+|[^ a-zA-Z0-9
_
()]+|[(]|[)])(.*)"
,
s
)
end
)
tok
=
strip
(
m
.
captures
[
1
])
!
isempty
(
tok
)
&&
push!
(
toks
,
tok
)
...
...
test/data_downloaded.jl
View file @
e1c5f179
...
...
@@ -63,4 +63,9 @@ model_paths = Dict{String,String}(
df
(
"iJR904.mat"
),
"d17be86293d4caafc32b829da4e2d0d76eb45e1bb837e0138327043a83e20c6e"
,
),
"Recon3D.json"
=>
download_data_file
(
"http://bigg.ucsd.edu/static/models/Recon3D.json"
,
df
(
"Recon3D.json"
),
"aba925f17547a42f9fdb4c1f685d89364cbf4979bbe7862e9f793af7169b26d5"
,
),
)
test/io/io.jl
View file @
e1c5f179
...
...
@@ -16,4 +16,11 @@
Set
(
"r_"
.*
lowercase
.
(
reactions
(
matlabmodel
)))
@test
Set
(
lowercase
.
(
reactions
(
sbmlmodel
)))
==
Set
(
"r_"
.*
lowercase
.
(
reactions
(
jsonmodel
)))
# specifically test parsing of gene-reaction associations in Recon
reconmodel
=
load_model
(
StandardModel
,
model_paths
[
"Recon3D.json"
])
@test
n_reactions
(
reconmodel
)
==
10600
recon_grrs
=
[
r
.
grr
for
(
i
,
r
)
in
reconmodel
.
reactions
if
!
isnothing
(
r
.
grr
)]
@test
length
(
recon_grrs
)
==
5938
@test
sum
(
length
.
(
recon_grrs
))
==
13903
end
cylon-x
🤖
@cylon-x
mentioned in commit
fff06453
·
Jan 25, 2022
mentioned in commit
fff06453
mentioned in commit fff064535e87c234dfb0426032bbe78aa6d1d1dd
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