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

Just updated one or two small things

parent 106ffe4d
No related branches found
No related tags found
No related merge requests found
Pipeline #14625 failed with stage
in 2 minutes and 27 seconds
......@@ -201,6 +201,9 @@ class Call(Executor):
raise Exception("This shouldn't happen")
return code.split()
def get_artificial_status(self):
return False
def analye_parameters(self, param):
#Step 1 -> get parameters
......
......@@ -19,13 +19,13 @@ class Main(Nextflow_Building_Blocks):
executors = self.get_all_executors_in_subworkflow()
pos = {}
for e in executors:
code = e.get_code(get_OG = True)
#We don't have to check the calls -> since there are renamed with their ids when we rewrite the code -> so it solve the issue
if(code in seen and e.get_type()=="Operation"):
raise BioFlowInsightError(f'Operation "{code}" appears twice in the workflow in the exact same way. BioFlow-Insight cannot rewrite the workflow then, try slighly changing how one of the executors is defined', type = "Rewrite Error")
seen[code] = ''
pos[e] = e.get_position_in_main(e)
#TODO add sort here
if(not e.get_artificial_status()):
code = e.get_code(get_OG = True)
#We don't have to check the calls -> since there are renamed with their ids when we rewrite the code -> so it solve the issue
if(code in seen and e.get_type()=="Operation"):
raise BioFlowInsightError(f'Operation "{code}" appears twice in the workflow in the exact same way. BioFlow-Insight cannot rewrite the workflow then, try slighly changing how one of the executors is defined', type = "Rewrite Error")
seen[code] = e
pos[e] = e.get_position_in_main(e)
pos = {k: v for k, v in sorted(pos.items(), key=lambda item: item[1])}
for e in pos:
if(e.get_type()=="Call"):
......
......@@ -1620,7 +1620,12 @@ def extract_tools(script, extract_general_tools = False):
tools.append("perl")
elif(extension==".jl"):
tools.append("julia")
elif (ex!="" and len(ex)>1 and ex not in general_tools and ex[-1]!=":" and re.fullmatch(r"\w", ex[0])):
elif (ex!=""
and len(ex)>1
and ex not in general_tools
and ex[-1]!=":"
and re.fullmatch(r"\w", ex[0])
and "=" not in ex):
tools.append(ex)
#If the tool is java -> we search for the jar file in the command
if(ex=="java"):
......
......@@ -436,9 +436,7 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
for p in sampled:
name_select.append(p.get_alias())
return name_select
else:
print("here")
#This methods generates a random set of processes to consider as relavant
def generate_random_relevant_processes(self, alpha = -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