Skip to content
Snippets Groups Projects
Commit 870d0b4b authored by David Hoksza's avatar David Hoksza
Browse files

gui: revert export step + 1 and enable export of original graph

parent 41e4996a
Branches duplication
No related tags found
No related merge requests found
......@@ -3,6 +3,6 @@ openTgtFileDir=C:/projects/git/talent/tmp/dup2.xml
openTmpFileDir=C:/projects/git/talent/tmp/dup2.xml
openOutputPathButton=C:/projects/git/talent/out
openOutputPath=C:/projects/git/talent/out
opnBcFile=C:/projects/git/talent/tests/biomodels/predBIOMD0000000572_url--from--multiple-tgt-ddup_True_tmp-ddup_True.pkl
opnBcFile=C:/projects/git/talent/tests/biomodels/x.pkl
cbTgtType=0
cbTmpType=2
......@@ -28,9 +28,9 @@ def export_sbml(sbml:str, path:str, format:str, minerva_instance:str):
with open(path, mode) as f:
f.write(result)
def export_step(bc:bt.BeautificationChain, output_path, format, minerva_instance, step:int = -1):
def export_step(bc:bt.BeautificationChain, output_path, format, minerva_instance, step:int = -1, original_graph=False):
g = bc[step].g if len(bc) > 0 else bc.g
g = bc.g if len(bc) == 0 or original_graph else bc[step].g
sbml_string = gu.graph_to_sbml(g)
export_sbml(sbml_string, output_path, format, minerva_instance)
......
......@@ -450,8 +450,9 @@ class OperationWidget(QWidget):
# ext = file_type.split('.')[1].replace(')', '')
# convert.export_step(bc = self.bc, output_path="{}.{}".format(f_name, ext), format=fmt,
# minerva_instance=settings.minerva_instance, step=self.ix_op)
original_graph = self.ix_op == -1
export.export_step(bc=self.bc, output_path=f_name, format=fmt,
minerva_instance=settings.minerva_instance, step=self.ix_op+1)
minerva_instance=settings.minerva_instance, step=self.ix_op, original_graph=original_graph)
def beautify(self, op: bt.BeautificationOp):
if self.ix_op < len(self.bc) - 1:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment