0
votes
rule rule1:
    output: tsv = "..."
    input: faa = "..."
    shell:
        """
        awk ... > {output.tsv}
        awk ... {input.faa} >> {output.tsv}
        """
rule rule2:
    output:
        tsv = "..."
    input:
        tsv = rules.rule1.output.tsv,
    shell:
        """
        awk ... {input.tsv} > {output.tsv}
        """

As it illustrated above, rule2 takes input file from rule1. According to the official docs, since the output file in rule1 is created successfully by awk, Snakemake assumes everything worked fine, even if my output file is incomplete, because awk is going to append to that file. Snakemake just ran rule2 and took the incomplete file from rule1. Actually, the second awk command in rule1 have not being executed, leaving the output file incomplete.