Commit f3e5201c authored by Midoux Cedric's avatar Midoux Cedric
Browse files

Update rule all

parent 7c9be488
......@@ -107,9 +107,9 @@ def contigs_input(wildcards):
def contigsExpand_input(wildcards):
if config["ASSEMBLER"] == "megahit":
return [expand("work/megahit/{sample}/{sample}.contigs.fa", sample=SAMPLES)]
return [expand("work/megahit/{sample}/{sample}.contigs.fa", sample=config["SAMPLES"])]
elif config["ASSEMBLER"] == "metaspades":
return [expand("work/metaSPADES/{sample}/{sample}.contigs.fasta", sample=SAMPLES)]
return [expand("work/metaSPADES/{sample}/{sample}.contigs.fasta", sample=config["SAMPLES"])]
def coassembly_contigs_input(wildcards):
if config["ASSEMBLER"] == "megahit":
......
......@@ -15,13 +15,13 @@ rule mapping:
input:
R1 = "DATA/trim/{reads}_R1.fastq.gz",
R2 = "DATA/trim/{reads}_R2.fastq.gz",
i = expand("work/index/{{contigs}}.{ext}.bt2l", ext=["1", "2", "3", "4", "rev.1", "rev.2"])
i = expand("work/index/{{sample}}.{ext}.bt2l", ext=["1", "2", "3", "4", "rev.1", "rev.2"])
output:
sam = temp("work/bowtie/align-{contigs}-{reads}.sam"),
bam = "work/bowtie/align-{contigs}-{reads}.bam",
bai = "work/bowtie/align-{contigs}-{reads}.bam.bai"
sam = temp("work/bowtie/align-{sample}-{reads}.sam"),
bam = "work/bowtie/align-{sample}-{reads}.bam",
bai = "work/bowtie/align-{sample}-{reads}.bam.bai"
params:
index = "work/index/{contigs}"
index = "work/index/{sample}"
threads:
8
shell:
......@@ -48,10 +48,10 @@ rule mapping:
rule count_contig:
input:
bam = "work/bowtie/align-{contigs}-{reads}.bam",
bai = "work/bowtie/align-{contigs}-{reads}.bam.bai"
bam = "work/bowtie/align-{sample}-{reads}.bam",
bai = "work/bowtie/align-{sample}-{reads}.bam.bai"
output:
"report/count-contigs-{contigs}-{reads}.tsv"
"report/count-contigs-{sample}-{reads}.tsv"
shell:
"samtools idxstats "
"{input.bam} "
......@@ -61,10 +61,10 @@ rule count_contig:
rule count_gene:
input:
unpack(gff_input),
bam = "work/bowtie/align-{contigs}-{reads}.bam",
bai = "work/bowtie/align-{contigs}-{reads}.bam.bai"
bam = "work/bowtie/align-{sample}-{reads}.bam",
bai = "work/bowtie/align-{sample}-{reads}.bam.bai"
output:
"report/count-genes-{contigs}-{reads}.tsv"
"report/count-genes-{sample}-{reads}.tsv"
shell:
"htseq-count "
"--format bam "
......
......@@ -8,16 +8,18 @@ rule all:
input:
"report/multiqc_report.html",
expand("report/reads_{sample}-krona.html", sample=config["SAMPLES"]),
#coassembly
"report/quast_coassembly/report.html",
expand("report/count-contigs-coassembly-{sample}.tsv", sample=config["SAMPLES"]),
expand("report/count-genes-coassembly-{sample}.tsv", sample=config["SAMPLES"]),
"report/diamond_nr_coassembly.tsv",
"report/contigs_coassembly-taxNames.tsv",
expand("report/count-gene-coassembly-{sample}.tsv", sample=config["SAMPLES"]),
"report/genes_coassembly-taxNames.tsv",
"report/diamond_nr_coassembly.tsv",
"work/prokka/coassembly_prokka.tsv",
"work/interproscan/coassembly.faa.tsv",
"work/cdhit/catalogue.ffn",
#catalogue
"report/quast_results/report.html",
expand("report/count-contigs-catalogue-{sample}.tsv", sample=config["SAMPLES"]),
"report/diamond_nr_catalogue.tsv",
"report/contigs_catalogue-taxNames.tsv",
include: "../workflow_metagenomics/quality.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