diff --git a/snakemodules/genotype.smk b/snakemodules/genotype.smk index dc8c00933bd2a4f43aa36c1dfb01549086cca8dd..8eff668de840d931b21a429739663c53191620e2 100644 --- a/snakemodules/genotype.smk +++ b/snakemodules/genotype.smk @@ -1,28 +1,3 @@ -import os -rule sort_vcf: - input: - RESULTS_DIR + "/place-finish.done", - ins=RESULTS_DIR + "/insertions_unsorted.vcf" - output: - temp(RESULTS_DIR + "/insertions.vcf") - conda: - os.path.join(WORKFLOW_PATH,"snakemodules/envs/bcftools.yml") - resources: - mem_mb = resources["standard_2G"]["mem"], - runtime = resources["standard_2G"]["time"] - threads: - threads["single"] - log: - out="logs/genotype/sort_vcf.out", - err="logs/genotype/sort_vcf.err" - benchmark: - "benchmarks/genotype/sort_vcf.txt" - shell: - "bcftools sort {input.ins} " - " --output-file {output}" - " --output-type v" - " > {log.out} 2> {log.err}" - rule popins2_genotype: input: diff --git a/snakemodules/position.smk b/snakemodules/position.smk index 2cdd0a11f0c66f5defa233be0475821fada06f6f..5c9d5ce59fb28f48e028aeab9de9ca73edfe6a18 100644 --- a/snakemodules/position.smk +++ b/snakemodules/position.smk @@ -156,4 +156,29 @@ rule popins2_place_finish: " --prefix {WORK_DIR} " " --insertions {rules.popins2_place_refalign.output.vcf}" " --reference {REFERENCE} " + " > {log.out} 2> {log.err}" + + +rule sort_vcf: + input: + RESULTS_DIR + "/place-finish.done", + ins=RESULTS_DIR + "/insertions_unsorted.vcf" + output: + temp(RESULTS_DIR + "/insertions.vcf") + conda: + os.path.join(WORKFLOW_PATH,"snakemodules/envs/bcftools.yml") + resources: + mem_mb = resources["standard_2G"]["mem"], + runtime = resources["standard_2G"]["time"] + threads: + threads["single"] + log: + out="logs/genotype/sort_vcf.out", + err="logs/genotype/sort_vcf.err" + benchmark: + "benchmarks/genotype/sort_vcf.txt" + shell: + "bcftools sort {input.ins} " + " --output-file {output}" + " --output-type v" " > {log.out} 2> {log.err}" \ No newline at end of file