Commit 97f9e08b authored by Slaheddine Kastalli's avatar Slaheddine Kastalli
Browse files

paired end

parent 3b152cbc
rule dada2: rule dada2:
input: input:
filt = "work/filter/{sample}_1.fastq.gz" filt = "work/filter/{sample}.sra_1.fastq.gz",
filtrev = "work/filter/{sample}_2.fastq.gz" filtrev = "work/filter/{sample}.sra_2.fastq.gz"
output: output:
"work/dada/{sample}.rds" "work/dada/{sample}.rds"
threads: threads:
config["THREADS"] config["THREADS"]
script: script:
"dada2.R" "dada2.R"
rule makeSequenceTable: rule makeSequenceTable:
input: input:
expand("work/dada/{sample}.rds", sample=SAMPLES) expand("work/dada/{sample}.rds", sample=SAMPLES)
......
rule cutadapt: rule cutadapt:
input: input:
fwd = "DATA/{sample}_1.fastq.gz" fwd = "DATA/{sample}.sra_1.fastq.gz",
rev = "DATA/{sample}_2.fastq.gz" rev = "DATA/{sample}.sra_2.fastq.gz"
output: output:
cut = "work/cutadapt/{sample}_1.fastq.gz" cut = "work/cutadapt/{sample}.sra_1.fastq.gz",
cutrev = "work/cutadapt/{sample}_2.fastq.gz" cutrev = "work/cutadapt/{sample}.sra_2.fastq.gz"
params: params:
five = lambda wildcards: config["FIVE_PRIMER"][wildcards.sample], five = lambda wildcards: config["FIVE_PRIMER"][wildcards.sample],
three = lambda wildcards: config["THREE_PRIMER"][wildcards.sample] three = lambda wildcards: config["THREE_PRIMER"][wildcards.sample]
...@@ -25,10 +24,10 @@ rule cutadapt: ...@@ -25,10 +24,10 @@ rule cutadapt:
rule filter: rule filter:
input: input:
cut = "work/cutadapt/{sample}_1.fastq.gz" cut = "work/cutadapt/{sample}.sra_1.fastq.gz",
cutrev = "work/cutadapt/{sample}_2.fastq.gz" cutrev = "work/cutadapt/{sample}.sra_2.fastq.gz"
output: output:
filt = "work/filter/{sample}_1.fastq.gz" filt = "work/filter/{sample}.sra_1.fastq.gz",
filtrev = "work/filter/{sample}_2.fastq.gz" filtrev = "work/filter/{sample}.sra_2.fastq.gz"
script: script:
"filterAndTrim.R" "filterAndTrim.R"
rule fastqc: rule fastqc:
input: input:
"DATA/{sample}.fastq.gz" fwd = "DATA/{sample}.sra_1.fastq.gz",
output: rev = "DATA/{sample}.sra_2.fastq.gz"
zip = "work/fastqc/{sample}_fastqc.zip", output:
html = "work/fastqc/{sample}_fastqc.html" zip = "work/fastqc/{sample}_fastqc.zip",
params: html = "work/fastqc/{sample}_fastqc.html"
output = "work/fastqc/" params:
shell: output = "work/fastqc/"
"conda activate fastqc-0.11.8 " shell:
"&& " "conda activate fastqc-0.11.8 "
"fastqc " "&& "
"{input} " "fastqc "
"--noextract " "{input} "
"--outdir {params.output} " "--noextract "
"&& " "--outdir {params.output} "
"conda deactivate " "&& "
"conda deactivate "
rule multiqc: rule multiqc:
input: input:
expand("work/fastqc/{sample}_fastqc.zip", sample=SAMPLES) expand("work/fastqc/{sample}_fastqc.zip", sample=SAMPLES)
output: output:
html = "report/multiqc_report.html", html = "report/multiqc_report.html",
params: params:
output = "report/" output = "report/"
shell: shell:
"conda activate multiqc-1.8 " "conda activate multiqc-1.8 "
"&& " "&& "
"multiqc " "multiqc "
"--no-data-dir " "--no-data-dir "
"--outdir {params.output} " "--outdir {params.output} "
"{input} " "{input} "
"&& " "&& "
"conda deactivate " "conda deactivate "
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