From 59b3c56400748edee752ae81917bda0aaf3aac61 Mon Sep 17 00:00:00 2001 From: Sven Thiele Date: Thu, 6 Mar 2014 12:47:14 +0100 Subject: [PATCH] use pyasp-1.3.1 --- CHANGES.txt | 8 ++++++-- setup.py | 4 ++-- src/query.py | 14 +++++++------- 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 3209688..ec9aa2d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,7 +1,11 @@ -1.4 +v1.4.1 +---------------- +use pyasp-1.3.1 + +v1.4 ---------------- use pyasp-1.3 -1.0 (unreleased) +v1.0 (unreleased) ---------------- Initial release \ No newline at end of file diff --git a/setup.py b/setup.py index 2cc5ceb..98c64fe 100644 --- a/setup.py +++ b/setup.py @@ -33,7 +33,7 @@ def run(self): setup(cmdclass={'install': install}, name='shogen', - version='1.4', + version='1.4.1', url='http://pypi.python.org/pypi/shogen/', license='GPLv3+', description='Finding shortest genome segments that regulate metabolic pathways', @@ -45,6 +45,6 @@ def run(self): package_data = {'__shogen__' : ['encodings/*.lp']}, scripts = ['shogen.py'], install_requires=[ - "pyasp == 1.3" + "pyasp == 1.3.1" ] ) \ No newline at end of file diff --git a/src/query.py b/src/query.py index 94153f6..111e15f 100644 --- a/src/query.py +++ b/src/query.py @@ -63,7 +63,7 @@ def write(self,count, termset): def filter_couples(couple_facts, instance): prg = [filter_prg, instance, couple_facts.to_file()] solver = GringoClasp() - models = solver.run(prg,nmodels=0,collapseTerms=True, collapseAtoms=False) + models = solver.run(prg,collapseTerms=True, collapseAtoms=False) os.unlink(prg[2]) return models[0] @@ -76,7 +76,7 @@ def get_ksip_instance(instance, pmax): prg = [convert_prg , instance, inst ] solver = GringoClasp() - solution = solver.run(prg,1,collapseTerms=False, collapseAtoms=False) + solution = solver.run(prg,collapseTerms=False, collapseAtoms=False) os.unlink(inst) return solution[0] @@ -89,7 +89,7 @@ def get_sgs_instance(instance, pmax): prg = [convert_sds_prg , instance, inst ] solver = GringoClasp() - solution = solver.run(prg,1,collapseTerms=False, collapseAtoms=False) + solution = solver.run(prg,collapseTerms=False, collapseAtoms=False) os.unlink(inst) return solution[0] @@ -100,7 +100,7 @@ def preprocess(instance, start, goal, pmax): pmaxfact = String2TermSet('pmax('+str(pmax)+')') details = startfact.union(goalfact).union(pmaxfact) details_f = details.to_file() - prg = [prepro_prg , instance, details_f ] + prg = [prepro_prg, instance, details_f ] solver = GringoClasp() solution = solver.run(prg,1) @@ -126,12 +126,12 @@ def get_k_sgs(instance, start, end, pmax, k, dictg, revdictr): while count < k : prg = [length_prg , instance, details_f ] goptions=' --const pmin='+str(min) - coptions='--opt-heu --opt-strategy=1 --heu=vsids' + coptions='--opt-heu --opt-strategy=1 --heu=vsids ' #coptions='--opt-heu --heu=vsids' solver = GringoClasp(gringo_options=goptions,clasp_options=coptions) #solver = GringoUnClasp(gringo_options=goptions,clasp_options=coptions) #print "search1 ...", - optima = solver.run(prg,nmodels=0,collapseTerms=True,collapseAtoms=False) + optima = solver.run(prg,collapseTerms=True,collapseAtoms=False) if len(optima) : @@ -144,7 +144,7 @@ def get_k_sgs(instance, start, end, pmax, k, dictg, revdictr): prg = [length_prg , instance, details_f, exclude_sol([optima[0]]) ] goptions='--const pmin='+str(min) - coptions='--opt-heu --opt-strategy=1 --opt-mode=optN' + coptions='--opt-heu --opt-strategy=1 --opt-mode=optN --opt-bound='+str(min) solver = GringoClasp(gringo_options=goptions,clasp_options=coptions) #print "search2 ...", sols = solver.run(prg,collapseTerms=True,collapseAtoms=False)