Skip to content
Snippets Groups Projects
Commit fef4742a authored by George Marchment's avatar George Marchment
Browse files

Fix small bug -> input to subworkflow missing

parent 40055db5
No related branches found
No related tags found
No related merge requests found
Pipeline #14346 failed with stage
in 2 minutes and 21 seconds
...@@ -7,11 +7,12 @@ class Block(Root): ...@@ -7,11 +7,12 @@ class Block(Root):
Root.__init__(self = self, code = code, origin = origin, modules_defined = modules_defined, subworkflow_inputs = existing_channels) Root.__init__(self = self, code = code, origin = origin, modules_defined = modules_defined, subworkflow_inputs = existing_channels)
self.condition = Condition(origin=self, condition = condition) self.condition = Condition(origin=self, condition = condition)
#def initialise(self): def initialise(self):
# return super().initialise() if(self.condition.value not in []):
return super().initialise()
def get_type(self): def get_type(self):
return "Root" return "Block"
def same_condition(self, block): def same_condition(self, block):
return self.condition.same_condition(block.condition) return self.condition.same_condition(block.condition)
......
...@@ -163,10 +163,11 @@ class Call(Executor): ...@@ -163,10 +163,11 @@ class Call(Executor):
self.origin.add_channel(channel) self.origin.add_channel(channel)
channels = [channel] channels = [channel]
from .operation import Operation from .operation import Operation
ope = Operation(param, self) ope = Operation(f"{param}", self)
for channel in channels: for channel in channels:
channel.add_sink(self) channel.add_sink(self)
ope.add_element_origins(channel) ope.add_element_origins(channel)
ope.set_as_artificial()
self.parameters.append(ope) self.parameters.append(ope)
analysed_param = True analysed_param = True
...@@ -305,7 +306,7 @@ class Call(Executor): ...@@ -305,7 +306,7 @@ class Call(Executor):
operation = p operation = p
if(operation.show_in_structure): if(operation.show_in_structure):
operation.get_structure(dico) operation.get_structure(dico)
#dico["edges"].append({'A':str(operation), 'B':str(sub_input), "label":""}) dico["edges"].append({'A':str(operation), 'B':str(sub_input), "label":""})
#Case parameter is a Call #Case parameter is a Call
elif(p.get_type()=="Call"): elif(p.get_type()=="Call"):
......
...@@ -231,8 +231,6 @@ class Root(Nextflow_Building_Blocks): ...@@ -231,8 +231,6 @@ class Root(Nextflow_Building_Blocks):
position_2_thing_2_analyse = {} position_2_thing_2_analyse = {}
for block in self.blocks: for block in self.blocks:
pos = code.find(block.get_code()) pos = code.find(block.get_code())
print(block.get_code())
print()
if(pos!=-1): if(pos!=-1):
position_2_thing_2_analyse[pos] = block position_2_thing_2_analyse[pos] = block
code = code.replace(block.get_code(), "a"*len(block.get_code()), 1) code = code.replace(block.get_code(), "a"*len(block.get_code()), 1)
...@@ -247,20 +245,18 @@ class Root(Nextflow_Building_Blocks): ...@@ -247,20 +245,18 @@ class Root(Nextflow_Building_Blocks):
raise Exception("This shouldn't happen") raise Exception("This shouldn't happen")
sorted_position_2_thing_2_analyse = dict(sorted(position_2_thing_2_analyse.items())) sorted_position_2_thing_2_analyse = dict(sorted(position_2_thing_2_analyse.items()))
print(sorted_position_2_thing_2_analyse)
for key in sorted_position_2_thing_2_analyse: for key in sorted_position_2_thing_2_analyse:
element = sorted_position_2_thing_2_analyse[key] element = sorted_position_2_thing_2_analyse[key]
element.initialise() element.initialise()
#for block in self.blocks: #for block in self.blocks:
# print("block",code.find(block.get_code()))
# #TODO -> this would be the place you put the verification of the conditions # #TODO -> this would be the place you put the verification of the conditions
# block.initialise() # block.initialise()
# #
##Analyse Executors ##Analyse Executors
#for e in self.executors: #for e in self.executors:
# print(code.find(e.get_code()))
# e.initialise() # e.initialise()
#Initialise each subworkflow being called #Initialise each subworkflow being called
......
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