Commit b316d0de authored by mmassaviol's avatar mmassaviol
Browse files

Update megahit input functions

parent e39591c0
......@@ -398,15 +398,13 @@ def generate_pipeline_files(workflow_name, output_dir, local_config="default"):
### Copy scripts and other files
NB_SCRIPTS = len(list(generate_prepare_report_scripts())) + len(list(generate_tools_scripts()))
NB_SCRIPTS = len(list(generate_prepare_report_scripts()["SCRIPTS"])) + len(list(generate_tools_scripts()))
if not os.path.isdir(output_dir + "/files/scripts"):
os.mkdir(output_dir + "/files/scripts")
if (NB_SCRIPTS==0):
with open(output_dir + "/files/scripts/.gitignore",'w') as gitignore:
to_write ="""# Ignore everything in this directory
*
# Except this file
to_write ="""# gitignore to force creation of scripts dir
!.gitignore
"""
gitignore.write(to_write)
......
......@@ -18,32 +18,7 @@ def generate(name):
# imports
result += "import os\n"
result += "import re\n"
result += "import snakemake.utils\n"
result += "import csv\n"
result += "\n"
# Wildcards
result += "#############\n"
result += "# Wildcards #\n"
result += "#############\n"
result += "\n"
#result += "SAMPLES = config[\"samples\"]\n"
result += "STEPS = config[\"steps\"]\n"
result += "PREPARE_REPORT_OUTPUTS = config[\"prepare_report_outputs\"]\n"
result += "PREPARE_REPORT_SCRIPTS = config[\"prepare_report_scripts\"]\n"
result += "OUTPUTS = config[\"outputs\"]\n"
result += "PARAMS_INFO = config[\"params_info\"]\n"
if ("stop_cases" in yaml.keys()):
result += "STOP_CASES = config[\"stop_cases\"]\n"
result += "config = config[\"params\"]\n"
result += "\n"
result += "{import global_imports}\n\n"
# intputs
......
......@@ -22,11 +22,15 @@ def quality_check__fastqc_PE_inputs():
inputs["read2"] = raw_reads["read2"]
return inputs
def assembling__megahit_inputs():
def assembling__megahit_SE_inputs():
inputs = dict()
inputs["read"] = expand(raw_reads["read"],sample=SAMPLES)
if (config["SeOrPe"] == "PE"):
inputs["read2"] = expand(raw_reads["read2"],sample=SAMPLES)
return inputs
def assembling__megahit_PE_inputs():
inputs = dict()
inputs["read"] = expand(raw_reads["read"],sample=SAMPLES)
inputs["read2"] = expand(raw_reads["read2"],sample=SAMPLES)
return inputs
def find_mitoscaf__mitoz_findmitoscaf_inputs():
......
......@@ -22,11 +22,15 @@ def fastqc_PE_inputs():
inputs["read2"] = raw_reads["read2"]
return inputs
def megahit_inputs():
def assembling__megahit_SE_inputs():
inputs = dict()
inputs["read"] = expand(raw_reads["read"],sample=SAMPLES)
if (config["SeOrPe"] == "PE"):
inputs["read2"] = expand(raw_reads["read2"],sample=SAMPLES)
return inputs
def assembling__megahit_PE_inputs():
inputs = dict()
inputs["read"] = expand(raw_reads["read"],sample=SAMPLES)
inputs["read2"] = expand(raw_reads["read2"],sample=SAMPLES)
return inputs
def blast_refseq_inputs():
......
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