The workflow is divided into two parts since snakemake does not allow one input file to generate multiple output files regarding the script. The first part is in the template directory, and the second part is in the modified_file directory.