79417296

Date: 2025-02-06 09:05:50
Score: 0.5
Natty:
Report link

Thanks to @Wayne!

According to the issue Snakefile is run a second time if rule contains run directive #2350 I decided to use "shell" instead of "run" in my main_rule. This prevents snakemake from running the snakefile code twice. My working snakefile now looks like this:

#!/bin/python
print('import packages')

from datetime import datetime
import time

now = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
tarfile = now + '_stardist.tar'
print(tarfile)

rule all:
    input: {tarfile}

rule main_rule:
    input: 
    output: {tarfile}
    shell: 
        "touch {tarfile}"
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Has code block (-0.5):
  • Self-answer (0.5):
Posted by: Antje Janosch