diff --git a/src/grr_utils.jl b/src/grr_utils.jl index cfa6dec..eb9da5d 100644 --- a/src/grr_utils.jl +++ b/src/grr_utils.jl @@ -24,7 +24,7 @@ const grr_grammar = begin p(m[i]) || break last = i end - last + return last end # eat one of keywords diff --git a/src/interface.jl b/src/interface.jl index d9c128d..d25b33a 100644 --- a/src/interface.jl +++ b/src/interface.jl @@ -210,7 +210,7 @@ function Base.convert(::Type{JSONFBCModel}, mm::A.AbstractFBCModel) I, V = findnz(S[:, ri]) res["metabolites"] = Dict{String,Float64}([met_ids[ii] => vv for (ii, vv) in zip(I, V)]) - res + identity(res) end for (ri, rid) in enumerate(rxn_ids) ] diff --git a/src/utils.jl b/src/utils.jl index ec052ef..aa913fb 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -40,8 +40,8 @@ function parse_annotations_or_notes(x) for (k, vs) in x if isa(vs, String) a_or_n[k] = String[vs] - else - a_or_n[k] = String[v for v in vs] + elseif isa(vs, AbstractDict) || isa(vs, AbstractVector) + a_or_n[k] = String[string(p) for p in collect(vs)] end end return a_or_n