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

Fixed weird bug

parent f9dba7a9
No related branches found
No related tags found
No related merge requests found
Pipeline #14356 failed with stage
in 2 minutes and 21 seconds
......@@ -7,11 +7,6 @@ class Block(Root):
Root.__init__(self = self, code = code, origin = origin, modules_defined = modules_defined, subworkflow_inputs = existing_channels)
self.condition = Condition(origin=self, condition = condition)
def delete(self):
super().delete()
self.condition.delete()
del self.condition
def initialise(self):
if(self.condition.value not in self.origin.get_conditions_2_ignore()):
return super().initialise()
......
......@@ -26,9 +26,7 @@ class Call(Executor):
#It's important this is last
#self.condition = Condition(self)
def delete(self):
self.condition.delete()
del self.condition
#This method returns all the calls inside a call eg p1(p2(), p3()) returns [p1(p2(), p3()), p2(), p3()]
def get_all_calls(self):
......
......@@ -16,13 +16,14 @@ class Channel(Nextflow_Building_Blocks):
def __init__(self, name, origin):
self.name = name.strip()
self.origin = origin
self.source = []
self.sink = []
to_call = []
for m in self.get_modules_defined():
to_call.append(m.get_alias())
if(self.name in to_call):
raise BioFlowInsightError(f"'{self.name}' is trying to be created as a channel{self.get_string_line(self.origin.get_code())}. It already exists as a process or a subworkflow in the nextflow file.", num = 4, origin=self)
self.source = []
self.sink = []
def get_code(self, get_OG = True):
......
......@@ -11,9 +11,6 @@ class Code:
self.initialise()
#self.check_its_nextflow()
def delete(self):
del self.code
del self.code_wo_comments
def initialise(self):
......
......@@ -20,7 +20,7 @@ class Executor(Nextflow_Building_Blocks):
def __init__(self, code, origin):
self.origin = origin
self.code = Code(code = code, origin = self)
self.condition = None
......
......@@ -73,7 +73,7 @@ class Main(Nextflow_Building_Blocks):
#Check that includes are not defined in the main or subworkflows
self.check_includes()
self.root = Root(code=self.get_code(), origin=self, modules_defined=self.modules_defined)
self.root = Root(code=self.get_code(), origin=self, modules_defined=self.modules_defined, subworkflow_inputs = [])
self.root.initialise()
......
......@@ -13,14 +13,7 @@ from .bioflowinsighterror import BioFlowInsightError
class Nextflow_Building_Blocks:
def __init__(self, code):
self.code = Code(code = code, origin = self)
def delete(self):
self.code.delete()
del self.code
#---------------------------------
#AUXILIARY METHODS FOR ALL CLASSES
#---------------------------------
......
......@@ -307,7 +307,6 @@ class Nextflow_File(Nextflow_Building_Blocks):
from .main import Main
#Extarct Processes
self.extract_processes()
print(len(self.processes))
code = self.get_code()
#Replacing the processes defined with their identifiers -> this is to simplifly the analysis with the conditions
for process in self.processes:
......
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