Commit e0744897 authored by cylon-x's avatar cylon-x 🤖
Browse files

automatic formatting changes

parent 167e0e79
Pipeline #42093 passed with stages
in 11 minutes and 55 seconds
...@@ -311,25 +311,24 @@ function Base.convert(::Type{StandardModel}, model::MetabolicModel) ...@@ -311,25 +311,24 @@ function Base.convert(::Type{StandardModel}, model::MetabolicModel)
lbs, ubs = bounds(model) lbs, ubs = bounds(model)
ocs = objective(model) ocs = objective(model)
end end
@timeit timer "assign genes" begin @timeit timer "assign genes" begin
# gtask = Base.Threads.@spawn begin # gtask = Base.Threads.@spawn begin
for gid in gids for gid in gids
notes = @timeit timer "gene_notes" gene_notes(model, gid) notes = @timeit timer "gene_notes" gene_notes(model, gid)
annotations = @timeit timer "gene_annotations" gene_annotations(model, gid) annotations = @timeit timer "gene_annotations" gene_annotations(model, gid)
modelgenes[gid] = Gene( modelgenes[gid] = Gene(gid; notes = notes, annotations = annotations) # TODO: add name accessor
gid;
notes = notes,
annotations = annotations,
) # TODO: add name accessor
end end
end end
@timeit timer "assign metabolites" begin @timeit timer "assign metabolites" begin
# mtask = Base.Threads.@spawn begin # mtask = Base.Threads.@spawn begin
for mid in metids for mid in metids
charge = @timeit timer "charge" metabolite_charge(model, mid) charge = @timeit timer "charge" metabolite_charge(model, mid)
formula = @timeit timer "formula" _maybemap(_unparse_formula, metabolite_formula(model, mid)) formula = @timeit timer "formula" _maybemap(
_unparse_formula,
metabolite_formula(model, mid),
)
compartment = @timeit timer "compartment" metabolite_compartment(model, mid) compartment = @timeit timer "compartment" metabolite_compartment(model, mid)
notes = @timeit timer "notes" metabolite_notes(model, mid) notes = @timeit timer "notes" metabolite_notes(model, mid)
annotations = @timeit timer "annotations" metabolite_annotations(model, mid) annotations = @timeit timer "annotations" metabolite_annotations(model, mid)
...@@ -345,7 +344,7 @@ function Base.convert(::Type{StandardModel}, model::MetabolicModel) ...@@ -345,7 +344,7 @@ function Base.convert(::Type{StandardModel}, model::MetabolicModel)
end end
@timeit timer "assign reactions" begin @timeit timer "assign reactions" begin
# rtask = Base.Threads.@spawn begin # rtask = Base.Threads.@spawn begin
for (i, rid) in enumerate(rxnids) for (i, rid) in enumerate(rxnids)
...@@ -354,10 +353,10 @@ function Base.convert(::Type{StandardModel}, model::MetabolicModel) ...@@ -354,10 +353,10 @@ function Base.convert(::Type{StandardModel}, model::MetabolicModel)
annotations = @timeit timer "annotations" reaction_annotations(model, rid) annotations = @timeit timer "annotations" reaction_annotations(model, rid)
subsys = @timeit timer "subsystem" reaction_subsystem(model, rid) subsys = @timeit timer "subsystem" reaction_subsystem(model, rid)
@timeit timer "get reaction equation" begin @timeit timer "get reaction equation" begin
rmets = Dict{String,Float64}() rmets = Dict{String,Float64}()
for (j, stoich) in zip(findnz(S[:, i])...) for (j, stoich) in zip(findnz(S[:, i])...)
rmets[metids[j]] = stoich rmets[metids[j]] = stoich
end end
end end
modelreactions[rid] = Reaction( modelreactions[rid] = Reaction(
rid; rid;
...@@ -376,7 +375,7 @@ function Base.convert(::Type{StandardModel}, model::MetabolicModel) ...@@ -376,7 +375,7 @@ function Base.convert(::Type{StandardModel}, model::MetabolicModel)
# wait(rtask) # wait(rtask)
# wait(mtask) # wait(mtask)
# wait(gtask) # wait(gtask)
show(timer) show(timer)
println() println()
return StandardModel( return StandardModel(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment