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

FIX: remove shebang in the main workflow -> example in "isugifNF/blast"

parent a560b381
No related branches found
No related tags found
No related merge requests found
Pipeline #14282 failed with stage
in 2 minutes and 32 seconds
...@@ -696,15 +696,18 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen ...@@ -696,15 +696,18 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
tag = str(time.time()) tag = str(time.time())
code = self.nextflow_file.get_code() code = self.nextflow_file.get_code()
start_code = "#!/usr/bin/env nextflow" start_code = r"#!/usr/bin/env nextflow"
start_code_pattern = r"\#\!\s*\/usr\/bin\/env\s+nextflow"
end_code = "workflow.onComplete" end_code = "workflow.onComplete"
pos_start, pos_end= 0, len(code) pos_start, pos_end= 0, len(code)
if(code.find(end_code)!=-1): if(code.find(end_code)!=-1):
pos_end = code.find(end_code) pos_end = code.find(end_code)
code_to_replace = code[pos_start:pos_end] code_to_replace = code[pos_start:pos_end]
if(code.find(start_code)!=-1): for match in re.finditer(start_code_pattern, start_code):
pos_start = code.find(start_code)+len(start_code) pos_start = match.span(0)[1]+1
#if(code.find(start_code)!=-1):
# pos_start = code.find(start_code)+len(start_code)
body = code[pos_start:pos_end]#.replace('\n', '\n\t') body = code[pos_start:pos_end]#.replace('\n', '\n\t')
include_section = f"//INCLUDE_SECTION_{tag}" include_section = f"//INCLUDE_SECTION_{tag}"
......
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