Commit a494a12b authored by mmassaviol's avatar mmassaviol
Browse files

Update snakefile generation tools

parent b2994849
......@@ -43,21 +43,21 @@ def generate(name):
size_inputs = len(cmd_inputs)
if(size_inputs == 0):
result += "\t\t**" + name + "_inputs(),\n"
#if(size_inputs == 0):
result += "\t\t**" + name + "_inputs(),\n"
for input in cmd_inputs:
if "name" in input:
if input['name'] == "reads":
result += "\t\t**" + name + "_inputs(),\n"
# if input['name'] == "reads":
# result += "\t\t**" + name + "_inputs(),\n"
elif "directory" in input:
if "directory" in input:
result += "\t\t" + input['name'] + " = " + result_dir + " + \"/\"" + " + \"" + input['directory'] + "\",\n"
elif "file" in input:
if "file" in input:
result += "\t\t" + input['name'] + " = " + result_dir + " + \"/\"" + " + \"" + input['file'] + "\",\n"
......
......@@ -146,14 +146,14 @@ def generate(name):
result += "{import global_rules}\n"
print(result)
#print(result)
#path_snakefile = PATH_INPUT + "/" + name + "/" + name + ".snakefile"
#f = open(path_snakefile, "w")
#f.write(result)
#f.close()
path_snakefile = PATH_INPUT + "/" + name + "/" + name + ".snakefile"
f = open(path_snakefile, "w")
f.write(result)
f.close()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment