Skip to content
Snippets Groups Projects
Commit 57e1a319 authored by Anna Mauti Gelbe's avatar Anna Mauti Gelbe
Browse files

Kraken db, Iva

parent 06c9e00f
No related branches found
No related tags found
No related merge requests found
...@@ -19,4 +19,5 @@ dependencies: ...@@ -19,4 +19,5 @@ dependencies:
- snakemake-wrapper-utils=0.3 - snakemake-wrapper-utils=0.3
- kmc=3.2.1 - kmc=3.2.1
- Trimmomatic=0.32 - Trimmomatic=0.32
- kraken2=2.1.2
prefix: /buffer/ag_bsc/pmsb_workflows_2022/virus/anna-swp-workflows/project/workflow/envs/yourenv.yaml prefix: /buffer/ag_bsc/pmsb_workflows_2022/virus/anna-swp-workflows/project/workflow/envs/yourenv.yaml
rule IVA: rule IVA:
input: input:
"results/unmapped_fastq/ERR4082860_1_unmapped.fastq", "results/unmapped_fastq/{sample}_1_unmapped.fastq",
"results/unmapped_fastq/ERR4082860_2_unmapped.fastq" "results/unmapped_fastq/{sample}_2_unmapped.fastq"
output: output:
"results/IVA/ERR4082860.trim.good.iva" "results/IVA/{sample}.trim.good.iva"
log: log:
"workflow/report/IVA/ERR4082860.log" "workflow/report/IVA/{sample}.log"
threads:4 threads:20
conda: conda:
"../envs/yourenv.yaml" "../envs/yourenv.yaml"
shell: shell:
"iva --threads {threads} -f {input[0]} -r {input[1]} {output} 2> {log}" "iva --threads {threads} -f {input[0]} -r {input[1]} {output} 2> {log}"
\ No newline at end of file
rule build: rule build:
input: input:
"results/fastp/trimmed/ERR4082860.1.fastq" sample=["results/fastp/trimmed/ERR4082860.1.fastq", "results/fastp/trimmed/ERR4082860.2.fastq"]
output: output:
"results/krakendb/db" "results/krakendb/db"
threads:4 threads:4
conda: conda:
"../envs/yourenv.yaml" "../envs/yourenv.yaml"
shell: shell:
"kraken2-build --standard --threads {threads} --db db" "kraken2-build --standard --threads {threads} --db {output}"
rule report: rule report:
input: input:
...@@ -19,6 +18,6 @@ rule report: ...@@ -19,6 +18,6 @@ rule report:
conda: conda:
"../envs/yourenv.yaml" "../envs/yourenv.yaml"
log: log:
"workflow/report/kraken/{sample}.log" "workflow/report/kraken_report/{sample}.log"
shell: shell:
"kraken2 --report --db {input.db} {input.sample} > {output} 2> {log}" "kraken2 --report --db {input.db} {input.sample} > {output} 2> {log}"
\ No newline at end of file
...@@ -5,14 +5,13 @@ samples = pd.read_table(config["samples"], index_col="sample") ...@@ -5,14 +5,13 @@ samples = pd.read_table(config["samples"], index_col="sample")
rule all: rule all:
input: input:
"results/IVA/ERR4082860.trim.good.iva", expand("results/IVA/{sample}.trim.good.iva", sample=samples.index)
"ERR4082860_report.txt"
include: "rules/fastp.smk" include: "rules/fastp.smk"
include: "rules/bowtie2.smk" include: "rules/bowtie2.smk"
include: "rules/samtools.smk" include: "rules/samtools.smk"
include: "rules/IVA.smk" include: "rules/IVA.smk"
include: "rules/kraken.smk" #include: "rules/kraken.smk"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment