Skip to content

Commit

Permalink
Merge pull request #429 from sys-bio/develop
Browse files Browse the repository at this point in the history
Pull to HEAD
  • Loading branch information
Kiri Choi authored Jan 24, 2019
2 parents 08705f3 + 796c632 commit 1be924c
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ matplotlib>=2.0.2
pandas>=0.20.2

# SBW-derived
libroadrunner>=1.4.24
libroadrunner>=1.5.3
phrasedml>=1.0.9
antimony>=2.9.4
rrplugins>=1.1.10
Expand Down
2 changes: 1 addition & 1 deletion tellurium/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.4
2.1.5
2 changes: 1 addition & 1 deletion tellurium/sedml/tesedml.py
Original file line number Diff line number Diff line change
Expand Up @@ -1544,7 +1544,7 @@ def outputPlotSettings():

# all lines of same cuve have same color
settings = PlotSettings(
colors=[u'C0', u'C1', u'C2', u'C3', u'C4', u'C5', u'C6', u'C7', u'C8', u'C9'],
colors=[u'#1f77b4', u'#ff7f0e', u'#2ca02c', u'#d62728', u'#9467bd', u'#8c564b', u'#e377c2', u'#7f7f7f', u'#bcbd22', u'#17becf'],
figsize=(9, 5),
dpi=80,
facecolor='w',
Expand Down
13 changes: 7 additions & 6 deletions tellurium/teconverters/inline_omex.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def __init__(self, sources):
description=DumpJSONInfo(),
creator=readCreator()
)

# Convert antimony to sbml
for t, loc, master in (
(x['source'], x['location'] if 'location' in x else None, x['master'] if 'master' in x else None)
Expand Down Expand Up @@ -88,7 +88,7 @@ def __init__(self, sources):


@classmethod
def fromString(cls, omex_str):
def fromString(cls, omex_str, comp=False):
"""Given mixed Antimony/PhraSEDML, separates out the constituent parts.
Assumes that Antimony and PhraSEDML are not mixed on the same line.
Expand Down Expand Up @@ -183,10 +183,11 @@ def add_source(src, type, args):
sources.remove(src)
elif src['type'] == 'antimony':
antimony_combined += src['source']
sources = [{
'source': antimony_combined,
'type': 'antimony',
}]
if comp:
sources = [{
'source': antimony_combined,
'type': 'antimony',
}]
if phrasedml_combined:
sources.append({
'source': phrasedml_combined,
Expand Down
4 changes: 2 additions & 2 deletions tellurium/tellurium.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,12 +695,12 @@ def exportInlineOmex(inline_omex, export_location):
saveInlineOMEX(inline_omex, export_location)


def executeInlineOmex(inline_omex):
def executeInlineOmex(inline_omex, comp=False):
""" Execute inline phrasedml and antimony.
:param inline_omex: String containing inline phrasedml and antimony.
"""
in_omex = teconverters.inlineOmex.fromString(inline_omex)
in_omex = teconverters.inlineOmex.fromString(inline_omex, comp=comp)
in_omex.executeOmex()


Expand Down
2 changes: 1 addition & 1 deletion tellurium/tests/test_tellurium.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def test_jarnac_vs(self):
def test_jarnac_dv(self):
r = te.loada(self.ant_str)
m1 = r.dv()
m2 = r.model.getStateVectorRate()
m2 = r.getRatesOfChange()
self.assertTrue(np.allclose(m1, m2))

def test_jarnac_rv(self):
Expand Down

0 comments on commit 1be924c

Please sign in to comment.