Commit afd4bd7c authored by khalid's avatar khalid
Browse files

Add a PE_Mark variable for pair-end raw_reads

parent bad74a17
......@@ -81,6 +81,11 @@ def generate(name, path_yaml = "", path_input = DEFAULT_PATH_INPUT, path_output
# il faut vérifier que les samples sont les mêmes ?
if not raw_input.endswith("_index") and not raw_input.endswith("_popmap") and not raw_input.endswith("_vcfFile") and not raw_input.endswith("_gff3"):
result += "SAMPLES = "+raw_input+"['samples']\n"
if raw_input.endswith("_reads"):
result += "PE_Mark = \"\"\n"
result += "if \"pe_mark\" in raw_reads:\n"
result += "\tPE_Mark = raw_reads[\"pe_mark\"]\n"
result += "\n"
......
......@@ -41,7 +41,7 @@ def raw_reads(results_dir, sample_dir, SeOrPe):
for sample in sorted(samples):
sampleTab.write("\n"+sample+"\t"+"\t".join(sorted(dicoSamples[sample])))
out = {'samples': sorted(samples), 'sample_suffix': suffix, 'dico': dicoSamples}
out = {'samples': sorted(samples), 'sample_suffix': suffix, 'dico': dicoSamples, 'pe_mark': PE_mark}
if SeOrPe == "SE":
out ["read"] = os.path.join(sample_dir,"{sample}"+suffix)
......
......@@ -7,7 +7,7 @@ if config["SeOrPe"] == "SE":
html = config["results_dir"]+'/'+config["<step_name>__fastqc_SE_output_dir"]+'/{sample}'+config["sample_suffix"].split(".")[0]+'_fastqc.html',
zip = config["results_dir"]+'/'+config["<step_name>__fastqc_SE_output_dir"]+'/{sample}'+config["sample_suffix"].split(".")[0]+'_fastqc.zip',
log: config["results_dir"]+'/logs/' + config["<step_name>__fastqc_SE_output_dir"] + '/{sample}_fastqc_log.txt'
threads: 1
threads: 2
params:
command = config["<step_name>__fastqc_SE_command"],
output_dir = config["results_dir"]+'/'+config["<step_name>__fastqc_SE_output_dir"]
......@@ -25,12 +25,13 @@ elif config["SeOrPe"] == "PE":
input:
**<step_name>__fastqc_PE_inputs()
output:
html1 = config["results_dir"]+'/'+config["<step_name>__fastqc_PE_output_dir"]+'/{sample}_R1'+config["sample_suffix"].split(".")[0]+'_fastqc.html',
zip1 = config["results_dir"]+'/'+config["<step_name>__fastqc_PE_output_dir"]+'/{sample}_R1'+config["sample_suffix"].split(".")[0]+'_fastqc.zip',
html2 = config["results_dir"]+'/'+config["<step_name>__fastqc_PE_output_dir"]+'/{sample}_R2'+config["sample_suffix"].split(".")[0]+'_fastqc.html',
zip2 = config["results_dir"]+'/'+config["<step_name>__fastqc_PE_output_dir"]+'/{sample}_R2'+config["sample_suffix"].split(".")[0]+'_fastqc.zip',
#PE_Mark is "_" or "_R" see raw_reads
html1 = config["results_dir"]+'/'+config["<step_name>__fastqc_PE_output_dir"]+'/{sample}'+PE_Mark +'1'+config["sample_suffix"].split(".")[0]+'_fastqc.html',
zip1 = config["results_dir"]+'/'+config["<step_name>__fastqc_PE_output_dir"]+'/{sample}'+PE_Mark +'1'+config["sample_suffix"].split(".")[0]+'_fastqc.zip',
html2 = config["results_dir"]+'/'+config["<step_name>__fastqc_PE_output_dir"]+'/{sample}'+PE_Mark +'2'+config["sample_suffix"].split(".")[0]+'_fastqc.html',
zip2 = config["results_dir"]+'/'+config["<step_name>__fastqc_PE_output_dir"]+'/{sample}'+PE_Mark +'2'+config["sample_suffix"].split(".")[0]+'_fastqc.zip',
log: config["results_dir"]+'/logs/' + config["<step_name>__fastqc_PE_output_dir"] + '/{sample}_fastqc_log.txt'
threads: 2
threads: 4
params:
command = config["<step_name>__fastqc_PE_command"],
output_dir = config["results_dir"]+'/'+config["<step_name>__fastqc_PE_output_dir"]
......
......@@ -35,10 +35,10 @@
inputs: [{ name: read, type: "reads" }, { name: read2, type: "reads" }],
outputs:
[
{ name: html1, type: "html", file: "{sample}_R1_fastqc.html", description: "Rapport html fastqc" },
{ name: zip1, type: "zip", file: "{sample}_R1_fastqc.zip", description: "Dossier zip fastqc" },
{ name: html2, type: "html", file: "{sample}_R2_fastqc.html", description: "Rapport html fastqc" },
{ name: zip2, type: "zip", file: "{sample}_R2_fastqc.zip", description: "Dossier zip fastqc" },
{ name: html1, type: "html", file: "{sample}_<R>1_fastqc.html", description: "Rapport html fastqc" },
{ name: zip1, type: "zip", file: "{sample}_<R>1_fastqc.zip", description: "Dossier zip fastqc" },
{ name: html2, type: "html", file: "{sample}_<R>2_fastqc.html", description: "Rapport html fastqc" },
{ name: zip2, type: "zip", file: "{sample}_<R>2_fastqc.zip", description: "Dossier zip fastqc" },
],
options:
[
......
Markdown is supported
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