diff --git a/workflow/rules/ref.smk b/workflow/rules/ref.smk index 6c0131c8..31fa8502 100644 --- a/workflow/rules/ref.smk +++ b/workflow/rules/ref.smk @@ -191,32 +191,15 @@ rule get_human_genome: "curl -SL -o {output} {params.human_genome} 2> {log}" -rule update_pangoLEARN: +rule get_pangolin_data: output: - directory("results/{date}/pangolin/pangoLEARN"), + "results/{date}/pangolin/pangolin-data.log", log: - "logs/{date}/pangolin/update.log", + "logs/{date}/pangolin/pangolin-data.log", conda: - "../envs/unix.yaml" - shell: - "(mkdir -p {output} &&" - " curl -L https://github.com/cov-lineages/pangoLEARN/archive/master.tar.gz |" - " tar xvz --strip-components=1 -C {output})" - " > {log} 2>&1" - - -rule update_lineages: - output: - directory("results/{date}/pangolin/lineages"), - log: - "logs/{date}/pangolin/update.log", - conda: - "../envs/unix.yaml" + "../envs/pangolin.yaml" shell: - "(mkdir -p {output} &&" - " curl -L https://github.com/cov-lineages/lineages/archive/master.tar.gz | " - " tar xvz --strip-components=1 -C {output})" - " > {log} 2>&1" + "pangolin --update-data > {log} 2>&1 && cp {log} {output}" rule get_gisaid_provision: diff --git a/workflow/rules/strain_calling.smk b/workflow/rules/strain_calling.smk index 0d86db0a..88d8a603 100644 --- a/workflow/rules/strain_calling.smk +++ b/workflow/rules/strain_calling.smk @@ -141,19 +141,16 @@ rule kallisto_plot_all_strains: rule pangolin_call_strains: input: contigs=get_pangolin_input, - pangoLEARN="results/{date}/pangolin/pangoLEARN", - lineages="results/{date}/pangolin/lineages", + data="results/{date}/pangolin/pangolin-data.log", output: "results/{date}/tables/strain-calls/{sample}.{stage}.strains.pangolin.csv", log: "logs/{date}/pangolin/{sample}.{stage}.log", - params: - pango_data_path=lambda w, input: os.path.dirname(input.pangoLEARN), conda: "../envs/pangolin.yaml" threads: 8 shell: - "pangolin {input.contigs} --data {params.pango_data_path} --outfile {output} > {log} 2>&1" + "pangolin {input.contigs} --outfile {output} > {log} 2>&1" rule pangolin_plot_all_strains: