From c46684c37d7b70a4d6e255357844abcc07de6a90 Mon Sep 17 00:00:00 2001 From: mariabernard <maria.bernard@jouy.inra.fr> Date: Thu, 4 Apr 2019 09:20:35 +0200 Subject: [PATCH] IMAGE_vqsr : add bcftools stat output in final output list and define final temp file to remove --- Snakemake/IMAGE_vqsr/Snakefile | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Snakemake/IMAGE_vqsr/Snakefile b/Snakemake/IMAGE_vqsr/Snakefile index 2b0499a..fe963bb 100644 --- a/Snakemake/IMAGE_vqsr/Snakefile +++ b/Snakemake/IMAGE_vqsr/Snakefile @@ -89,9 +89,8 @@ final_outputs.append("results/VQSR/" + gatk_prefix +"_vqsr_SNP.vcf.gz") final_outputs.append("results/VQSR/" + gatk_prefix +"_vqsr_INDEL.vcf.gz") final_outputs.append("results/genoFilter/" + gatk_prefix +"_vqsr_SNP_genFiltered.vcf.gz") final_outputs.append("results/genoFilter/" + gatk_prefix +"_vqsr_INDEL_genFiltered.vcf.gz") -final_outputs.append("results/bcftools_stats/" + gatk_prefix +"_vqsr_SNP_genFiltered.stat") -final_outputs.append("results/bcftools_stats/" + gatk_prefix +"_vqsr_INDEL_genFiltered.stat") - +final_outputs.append("results/bcftools_stats/" + gatk_prefix +"_vqsr_SNP_genFiltered.stats") +final_outputs.append("results/bcftools_stats/" + gatk_prefix +"_vqsr_INDEL_genFiltered.stats") #~ print(final_outputs) rule all: @@ -103,17 +102,29 @@ onsuccess: if not "--notemp" in sys.argv : temp_list = list() print("remove remained temporary file :\n") + + # uniq variants + for caller in ["gatk","freebayes","mpileup"] : + temp_list.append("results/intersect/uniq_"+caller+"_variants.vcf.gz.tbi") + temp_list.append("results/intersect/VQSR_trainingSet_untrusted_uniquely_called_variants.vcf.gz.tbi") + + # common variants + temp_list.append('results/intersect/common_variants.vcf.gz.tbi') + temp_list.append('results/hard_filtering/common_SNP_tagged.vcf.gz.tbi') + temp_list.append('results/hard_filtering/common_INDEL_tagged.vcf.gz.tbi') + # splited VCF files, except for uniquely called training set for prefix in trainingSets: if prefix != 'VQSR_trainingSet_trusted_3callers_hardFiltered_variants' and prefix != 'VQSR_trainingSet_untrusted_uniquely_called_variants': temp_list.append("results/split_SNP_INDEL/" + prefix + "_SNP.vcf.gz") temp_list.append("results/split_SNP_INDEL/" + prefix + "_INDEL.vcf.gz") - #temp_list.append("results/split_SNP_INDEL/" + prefix + "_SNP.vcf.gz.tbi") - #temp_list.append("results/split_SNP_INDEL/" + prefix + "_INDEL.vcf.gz.tbi") + temp_list.append("results/split_SNP_INDEL/" + prefix + "_SNP.vcf.gz.tbi") + temp_list.append("results/split_SNP_INDEL/" + prefix + "_INDEL.vcf.gz.tbi") + temp_list.append('results/split_SNP_INDEL/common_SNP.vcf.gz') temp_list.append('results/split_SNP_INDEL/common_INDEL.vcf.gz') - #temp_list.append('results/split_SNP_INDEL/common_SNP.vcf.gz.tbi') - #temp_list.append('results/split_SNP_INDEL/common_INDEL.vcf.gz.tbi') + temp_list.append('results/split_SNP_INDEL/common_SNP.vcf.gz.tbi') + temp_list.append('results/split_SNP_INDEL/common_INDEL.vcf.gz.tbi') for f in temp_list: print(f) -- GitLab