Commit 29e6c257 authored by Midoux Cedric's avatar Midoux Cedric
Browse files

quast

parent 7d94c2f8
......@@ -99,3 +99,49 @@ def contigs_input(wildcards):
return ["work/megahit/{wildcards.sample}/{wildcards.sample}.contigs.fa".format(wildcards=wildcards)]
elif config["ASSEMBLER"] == "metaspades":
return ["work/metaSPADES/{wildcards.sample}/{wildcards.sample}.contigs.fasta".format(wildcards=wildcards)]
def contigsExpand_input(wildcards):
if config["ASSEMBLER"] == "megahit":
return [expand("work/megahit/{sample}/{sample}.contigs.fa", sample=SAMPLES)]
elif config["ASSEMBLER"] == "metaspades":
return [expand("work/metaSPADES/{sample}/{sample}.contigs.fasta", sample=SAMPLES)]
def coassembly_contigs_input(wildcards):
if config["ASSEMBLER"] == "megahit":
return ["work/megahit/coassembly/coassembly.contigs.fa"]
elif config["ASSEMBLER"] == "metaspades":
return ["work/metaSPADES/coassembly/coassembly.contigs.fasta"]
rule quast:
input:
unpack(contigsExpand_input)
output:
"report/quast_results/report.html"
threads:
4
params:
output = lambda wildcards, output: os.path.dirname(str(output))
shell:
"quast "
"--mgm "
"--output-dir {params.output} "
"-L "
"--threads {threads} "
"{input} "
rule coassembly_quast:
input:
unpack(coassembly_contigs_input)
output:
"report/quast_coassembly/report.html"
threads:
4
params:
output = lambda wildcards, output: os.path.dirname(str(output))
shell:
"quast "
"--mgm "
"--output-dir {params.output} "
"-L "
"--threads {threads} "
"{input} "
......@@ -9,6 +9,7 @@ rule all:
"report/multiqc_report.html",
expand("report/reads_{sample}-krona.html", sample=config["SAMPLES"]),
"report/contigs_coassembly-taxNames.tsv",
"report/quast_coassembly/report.html",
include: "../workflow_metagenomics/quality.smk"
include: "../workflow_metagenomics/preprocess.smk"
......
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