From 016f8b3a904a747ae2798c4935a5cee0384db656 Mon Sep 17 00:00:00 2001 From: Christophe Clienti Date: Mon, 7 Mar 2022 14:17:16 +0100 Subject: [PATCH] Added missing new files in reason.updated_input during DAG construction Let's consider a 'A' rule that takes 'N' inputs from a 'B' rule with different wildcards. The input function for the A rule requests output files from 'B'. If a first run has already generated the output of 'A' and 'B' and if the input function of 'A' requests new input files from B not yet generated, snakemake will neither generate missing 'B' output files nor regenerate the 'A' output. However the list-input-changes is able to list correctly the missing files. The commit allows to generate missing 'B' outputs and regenerate the 'A' output. --- snakemake/dag.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snakemake/dag.py b/snakemake/dag.py index d768728bbf..ef81a0642a 100755 --- a/snakemake/dag.py +++ b/snakemake/dag.py @@ -996,7 +996,8 @@ def update_needrun(job): output_mintime_ = output_mintime.get(job) if output_mintime_: updated_input = [ - f for f in job.input if f.exists and f.is_newer(output_mintime_) + f for f in job.input + if f.exists and f.is_newer(output_mintime_) or not f.exists ] reason.updated_input.update(updated_input) if noinitreason and reason: