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: