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

Fixing some minors bugs

parent e37c9a29
No related branches found
No related tags found
No related merge requests found
Pipeline #14350 failed with stage
in 2 minutes and 34 seconds
...@@ -45,7 +45,7 @@ class Emitted(Channel): ...@@ -45,7 +45,7 @@ class Emitted(Channel):
self.emits = o self.emits = o
if(self.emits==None): if(self.emits==None):
raise Exception(f"No emitted matched with '{name}' (in file '{self.get_file_address()}'). Should match with emittes from '{self.emitted_by.get_name()}' (in file '{self.emitted_by.get_file_address()}'") raise Exception(f"No emitted matched with '{name}' (in file '{self.get_file_address()}'). Should match with emittes from '{self.emitted_by.get_first_element_called().get_name()}' (in file '{self.emitted_by.get_file_address()}'")
def set_emits(self, input): def set_emits(self, input):
thing_which_emits = self.emitted_by.get_first_element_called() thing_which_emits = self.emitted_by.get_first_element_called()
......
...@@ -79,7 +79,7 @@ class Include(Nextflow_Building_Blocks): ...@@ -79,7 +79,7 @@ class Include(Nextflow_Building_Blocks):
found_file = True found_file = True
if(not found_file and os.path.isfile(address[:-3]+"/main.nf")): if(not found_file and os.path.isfile(address[:-3]+"/main.nf")):
self.nextflow_file = Nextflow_File(address[:-3]+"/main.nf", origin=self) self.nextflow_file = Nextflow_File(address[:-3]+"/main.nf", workflow = self.nextflow_file_origin.get_workflow())
#TODO -> check if the nextflow_file is defined somewhere else? #TODO -> check if the nextflow_file is defined somewhere else?
#In the cas the nextflow file is imported multiple times #In the cas the nextflow file is imported multiple times
......
...@@ -25,6 +25,7 @@ class Nextflow_File(Nextflow_Building_Blocks): ...@@ -25,6 +25,7 @@ class Nextflow_File(Nextflow_Building_Blocks):
self.address = address self.address = address
self.workflow = workflow self.workflow = workflow
self.first_file = first_file self.first_file = first_file
self.main = None
self.workflow.add_nextflow_file_2_workflow(self) self.workflow.add_nextflow_file_2_workflow(self)
self.includes = [] self.includes = []
self.processes = [] self.processes = []
......
...@@ -500,7 +500,11 @@ class Operation(Executor): ...@@ -500,7 +500,11 @@ class Operation(Executor):
emited = self.check_is_emit(name) emited = self.check_is_emit(name)
if(not emited): if(not emited):
#TODO -> check at what extend this is used #TODO -> check at what extend this is used
channels = self.get_channels_same_level()+self.get_channels_above_level()+self.get_channels_inside_level()+self.get_channels_from_other_blocks_on_same_level() #This is just a trick so i don't have to specifically define the methods for subworkflows
thing = self
if(self.origin.get_type()=="Subworkflow"):
thing = self.origin.root
channels = thing.get_channels_same_level()+thing.get_channels_above_level()+thing.get_channels_inside_level()+thing.get_channels_from_other_blocks_on_same_level()
for c in channels: for c in channels:
if(c.get_name() in name): if(c.get_name() in name):
pos = [m.start() for m in re.finditer(c.get_name(), operation)] pos = [m.start() for m in re.finditer(c.get_name(), operation)]
......
...@@ -161,7 +161,11 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen ...@@ -161,7 +161,11 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
if(self.get_DSL() == "DSL1"): if(self.get_DSL() == "DSL1"):
return self.get_structure_DSL1(dico=dico) return self.get_structure_DSL1(dico=dico)
elif(self.get_DSL() == "DSL2"): elif(self.get_DSL() == "DSL2"):
return self.get_workflow_main().get_structure(dico) main = self.get_workflow_main()
if(main!=None):
return self.get_workflow_main().get_structure(dico)
else:
return dico
#return self.get_structure_DSL2(dico=dico, start = True) #return self.get_structure_DSL2(dico=dico, start = True)
else: else:
raise Exception(f"The workflow's DSL is '{self.DSL}' -> I don't know what this is!") raise Exception(f"The workflow's DSL is '{self.DSL}' -> I don't know what this is!")
......
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