From 0b5ebc9daa8cf7e2681e775c4ff90333e28c7328 Mon Sep 17 00:00:00 2001 From: Kedi Cao <kedic715@gmail.com> Date: Tue, 4 Mar 2025 17:29:46 +0100 Subject: [PATCH] re-arrange rules --- snakemodules/genotype.smk | 25 ------------------------- snakemodules/position.smk | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/snakemodules/genotype.smk b/snakemodules/genotype.smk index dc8c009..8eff668 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 2cdd0a1..5c9d5ce 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 -- GitLab