From 9b6ba7f08f964dc0222560c424ba8ed84a6debbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81lvarez=20Herrera?= Date: Thu, 4 Jan 2024 18:24:37 +0100 Subject: [PATCH] Fix snakemake typo --- workflow/rules/fetch.smk | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/workflow/rules/fetch.smk b/workflow/rules/fetch.smk index f56d7ac..f594a3f 100644 --- a/workflow/rules/fetch.smk +++ b/workflow/rules/fetch.smk @@ -2,30 +2,33 @@ rule fetch_alignment_reference: threads: 1 conda: "../envs/fetch.yaml" params: - ref = config["ALIGNMENT_REFERENCE"] + id = config["ALIGNMENT_REFERENCE"], + db = "nucleotide", + format = "fasta" output: fasta = OUTDIR/"reference.fasta" log: LOGDIR / "fetch_alignment_reference" / "log.txt" - shell: - "esearch -db nucleotide -query {params.ref} | efetch -format fasta > {output.fasta} 2> {log}" + wrapper: + "v3.3.3/bio/entrez/efetch" rule fetch_reference_gb: threads: 1 conda: "../envs/fetch.yaml" params: - ref = config["ALIGNMENT_REFERENCE"] + id = config["ALIGNMENT_REFERENCE"], + db = "gb", + format = "fasta" output: fasta = OUTDIR/"reference.gb" log: LOGDIR / "fetch_reference_gb" / "log.txt" - shell: - "esearch -db nucleotide -query {params.ref} | efetch -format gb > {output.fasta} 2> {log}" - + wrapper: + "v3.3.3/bio/entrez/efetch" -rule fetch_mapping_references: +rule fetch_mapping_references: # TODO: use wrapper threads: 1 conda: "../envs/fetch.yaml" input: @@ -45,13 +48,13 @@ rule fetch_mapping_references: rule fetch_alignment_annotation: threads: 1 params: - ref = config["ALIGNMENT_REFERENCE"] + id = config["ALIGNMENT_REFERENCE"] output: temp(OUTDIR/"reference.gff3") log: LOGDIR / "fetch_alignment_annotation" / "log.txt" shell: - "curl 'https://www.ncbi.nlm.nih.gov/sviewer/viewer.cgi?db=nuccore&report=gff3&id={params.ref}' -o {output} -s 2>{log}" + "curl 'https://www.ncbi.nlm.nih.gov/sviewer/viewer.cgi?db=nuccore&report=gff3&id={params.id}' -o {output} -s 2>{log}" rule fetch_problematic_vcf: