Skip to content
Snippets Groups Projects
Commit e5d63417 authored by mariabernard's avatar mariabernard
Browse files

IMAGE_vqsr : Execute VQSR on split SNP/INDEL GATK variant, not on full GATK variants

parent c3e523c8
No related branches found
No related tags found
No related merge requests found
......@@ -10,20 +10,28 @@ wildcard_constraints:
var = "SNP|INDEL"
def get_input_vcf(wildcards) :
print(wildcards.prefix)
if wildcards.prefix == "common" :
print("results/intersect/common_variants.vcf.gz")
return "results/intersect/common_variants.vcf.gz"
if wildcards.prefix == "VQSR_trainingSet_untrusted_uniquely_called_variants":
elif wildcards.prefix == "VQSR_trainingSet_untrusted_uniquely_called_variants":
print("results/intersect/VQSR_trainingSet_untrusted_uniquely_called_variants.vcf.gz")
return "results/intersect/VQSR_trainingSet_untrusted_uniquely_called_variants.vcf.gz"
elif wildcards.prefix == gatk_prefix:
return config['GATK_variants']
else:
for Set in config['vqsr_resources']:
if os.path.basename(Set['file']).startswith(wildcards.prefix):
return Set['file']
print("problem")
def get_input_index(wildcards) :
if wildcards.prefix == "common" :
return "results/intersect/common_variants.vcf.gz.tbi"
if wildcards.prefix == "VQSR_trainingSet_untrusted_uniquely_called_variants":
elif wildcards.prefix == "VQSR_trainingSet_untrusted_uniquely_called_variants":
return "results/intersect/VQSR_trainingSet_untrusted_uniquely_called_variants.vcf.gz.tbi"
elif wildcards.prefix == gatk_prefix:
return config['GATK_variants'] + ".tbi"
else:
for Set in config['vqsr_resources']:
if os.path.basename(Set['file']).startswith(wildcards.prefix):
......
......@@ -23,7 +23,7 @@ def get_trainingSet(wildcards):
rule VariantRecalibrator :
input :
ref = config["reference_genome"],
vcf = config["GATK_variants"],
vcf = "results/split_SNP_INDEL/{GATK_input_prefix}_{var}.vcf.gz",
resources = get_trainingSet
output :
recalFile = temp("results/VQSR/{GATK_input_prefix}_{var}.recal"),
......@@ -50,7 +50,7 @@ rule VariantRecalibrator :
rule ApplyRecalibration:
input:
ref = config["reference_genome"],
vcf = config["GATK_variants"],
vcf = "results/split_SNP_INDEL/{GATK_input_prefix}_{var}.vcf.gz",
recalFile = "results/VQSR/{GATK_input_prefix}_{var}.recal",
tranchesFile = "results/VQSR/{GATK_input_prefix}_{var}.tranches",
R = "results/VQSR/{GATK_input_prefix}_{var}.R"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment