snakecharm icon indicating copy to clipboard operation
snakecharm copied to clipboard

Rule or checkpoint has not beed defined false positive

Open iromeo opened this issue 3 years ago • 0 comments

image

shell.executable("bash")

rule all:
    input:
        'result.r1',
        'result.c1',  # targeting checkpoint output overrides input
        'result.c2'

# TODO: works OK
def rule1_input(wc):
    checkpoints.check1.get(**wc).output[0]
    return "result.r2"

rule r1:
    input:
        rule1_input
    output:
        'result.r1',
    shell:
        'echo {input} > {output}'


rule r2:
    output:
        'result.r2'
    shell:
        'echo r2 > {output}'


def check1_input(wc):
    checkpoints.check2.get(**wc).output[0]
    return 'result.r3'

checkpoint check1:
    input:
        check1_input
    output:
        'result.c1'
    shell:
        'echo c1 > {output}'


checkpoint check2:
    output:
        'result.c2'
    shell:
        'echo c2 > {output}'


rule r3:
    output:
        'result.r3'
    shell:
        'echo r3 > {output}'

iromeo avatar Jul 26 '21 17:07 iromeo