Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LCSB-BioCore
SBML.jl
Commits
7d49a30a
Unverified
Commit
7d49a30a
authored
Apr 13, 2021
by
Laurent Heirendt
✈
Committed by
GitHub
Apr 13, 2021
Browse files
Merge pull request #38 from LCSB-BioCore/mk-reformat
apply juliaformatter
parents
b8863bb4
34194021
Changes
4
Show whitespace changes
Inline
Side-by-side
docs/make.jl
View file @
7d49a30a
using
Documenter
,
SBML
makedocs
(
modules
=
[
SBML
],
makedocs
(
modules
=
[
SBML
],
clean
=
false
,
format
=
Documenter
.
HTML
(
prettyurls
=
!
(
"local"
in
ARGS
),
canonical
=
"https://lcsb-biocore.github.io/DistributedData.jl/stable/"
),
canonical
=
"https://lcsb-biocore.github.io/DistributedData.jl/stable/"
,
),
sitename
=
"SBML.jl"
,
authors
=
"The developers of SBML.jl"
,
linkcheck
=
!
(
"skiplinks"
in
ARGS
),
pages
=
[
"Documentation"
=>
"index.md"
,
],
pages
=
[
"Documentation"
=>
"index.md"
],
)
deploydocs
(
repo
=
"github.com/LCSB-BioCore/SBML.jl.git"
,
target
=
"build"
,
branch
=
"gh-pages"
,
push_preview
=
true
push_preview
=
true
,
)
test/ecoli_flux.jl
View file @
7d49a30a
...
...
@@ -2,7 +2,10 @@
sbmlfile
=
"Ec_core_flux1.xml"
if
!
isfile
(
sbmlfile
)
download
(
"http://systemsbiology.ucsd.edu/sites/systemsbiology.ucsd.edu/files/Attachments/Images/InSilicoOrganisms/Ecoli/Ecoli_SBML/Ec_core_flux1.xml"
,
sbmlfile
)
download
(
"http://systemsbiology.ucsd.edu/sites/systemsbiology.ucsd.edu/files/Attachments/Images/InSilicoOrganisms/Ecoli/Ecoli_SBML/Ec_core_flux1.xml"
,
sbmlfile
,
)
end
cksum
=
bytes2hex
(
sha256
(
open
(
sbmlfile
)))
...
...
@@ -23,12 +26,12 @@ end
mets
,
rxns
,
S
=
getS
(
mdl
)
@test
typeof
(
S
)
<:
AbstractMatrix
{
Float64
}
@test
typeof
(
getS
(
mdl
;
zeros
=
spzeros
)[
3
])
<:
SparseMatrixCSC
{
Float64
}
@test
typeof
(
getS
(
mdl
;
zeros
=
zeros
)[
3
])
==
Matrix
{
Float64
}
@test
typeof
(
getS
(
mdl
;
zeros
=
spzeros
)[
3
])
<:
SparseMatrixCSC
{
Float64
}
@test
typeof
(
getS
(
mdl
;
zeros
=
zeros
)[
3
])
==
Matrix
{
Float64
}
@test
length
(
mets
)
==
77
@test
length
(
rxns
)
==
77
@test
size
(
S
)
==
(
length
(
mets
),
length
(
rxns
))
@test
size
(
S
)
==
(
length
(
mets
),
length
(
rxns
))
# totally arbitrary value tests
@test
isapprox
(
sum
(
S
),
42.1479
)
...
...
@@ -47,10 +50,10 @@ end
@test
length
(
getLBs
(
mdl
))
==
length
(
rxns
)
@test
length
(
getUBs
(
mdl
))
==
length
(
rxns
)
getunit
=
(
val
,
unit
)
::
Tuple
->
unit
getunit
=
(
val
,
unit
)
::
Tuple
->
unit
@test
all
([
broadcast
(
getunit
,
lbs
)
broadcast
(
getunit
,
ubs
)]
.==
"mmol_per_gDW_per_hr"
)
getval
=
(
val
,
unit
)
::
Tuple
->
val
getval
=
(
val
,
unit
)
::
Tuple
->
val
lvals
=
broadcast
(
getval
,
lbs
)
uvals
=
broadcast
(
getval
,
ubs
)
@test
isapprox
(
lvals
[
27
],
uvals
[
27
])
...
...
test/loadmodels.jl
View file @
7d49a30a
sbmlfiles
=
[
# a test model from BIGG
(
"e_coli_core.xml"
,
(
"e_coli_core.xml"
,
"http://bigg.ucsd.edu/static/models/e_coli_core.xml"
,
"b4db506aeed0e434c1f5f1fdd35feda0dfe5d82badcfda0e9d1342335ab31116"
,
72
,
95
),
95
,
),
# a relatively new non-curated model from biomodels
(
"T1M1133.xml"
,
(
"T1M1133.xml"
,
"https://www.ebi.ac.uk/biomodels/model/download/MODEL1909260004.4?filename=T1M1133.xml"
,
"2b1e615558b6190c649d71052ac9e0dc1635e3ad281e541bc7d4fdf2892a5967"
,
2517
,
3956
),
3956
,
),
# a curated model from biomodels
(
"Dasgupta2020.xml"
,
(
"Dasgupta2020.xml"
,
"https://www.ebi.ac.uk/biomodels/model/download/BIOMD0000000973.3?filename=Dasgupta2020.xml"
,
"958b131d4df2f215dae68255433542f228601db0326d26a54efd08ddcf823489"
,
2
,
6
),
2
,
6
,
),
]
@testset
"Loading of models from various sources"
begin
...
...
test/version.jl
View file @
7d49a30a
@testset
"CCall to SBML works and SBML returns a version"
begin
@test
typeof
(
SBMLVersion
())
==
Pkg
.
VersionNumber
@test
typeof
(
SBMLVersion
())
==
Pkg
.
VersionNumber
end
cylon-x
🤖
@cylon-x
mentioned in commit
fac57361
·
Apr 13, 2021
mentioned in commit
fac57361
mentioned in commit fac5736145109e89b0672004b21bf8ec344d7592
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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