From ff870d40b303cae174040269b712c06089c67db6 Mon Sep 17 00:00:00 2001 From: Zachary Nolen Date: Mon, 30 Sep 2024 11:06:03 +0200 Subject: [PATCH] Make a param with the input file order list for bamlists This will force a rerun of the rule. I am not quite sure why it wouldn't before. The code should change if input order changes, but maybe Snakemake doesn't look inside input list expansions when determining code changes? --- workflow/rules/3.0_genotype_likelihoods.smk | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/workflow/rules/3.0_genotype_likelihoods.smk b/workflow/rules/3.0_genotype_likelihoods.smk index e6b78ad..3041608 100644 --- a/workflow/rules/3.0_genotype_likelihoods.smk +++ b/workflow/rules/3.0_genotype_likelihoods.smk @@ -19,10 +19,14 @@ rule angsd_makeBamlist: "logs/datasets/{dataset}/bamlists/{dataset}.{ref}_{population}{dp}.log", container: shell_container + params: + sampord=lambda w, input: f"{input.bams}", shell: """ - (readlink -f {input.bams} > {output} - truncate -s -1 {output}) 2> {log} + ( + echo "BAM order: {params.sampord}" > {log} + readlink -f {input.bams} > {output} 2>> {log} + truncate -s -1 {output}) 2>> {log} """