Commit b1780fe9 authored by van den Berg's avatar van den Berg
Browse files

Hide the absolute path for GATK for linting

parent a948a75c
...@@ -61,6 +61,9 @@ def set_default(key, value): ...@@ -61,6 +61,9 @@ def set_default(key, value):
set_default('scatter_size', 1000000000) set_default('scatter_size', 1000000000)
set_default('female_threshold', 0.6) set_default('female_threshold', 0.6)
# Hide the absolute path so the snakemake linter doesn't cry about it
set_default('gatk_jar', os.path.join('/','usr','GenomeAnalysisTK.jar'))
# Set the script paths # Set the script paths
set_default("covstats", srcdir("src/covstats.py")) set_default("covstats", srcdir("src/covstats.py"))
set_default("collect_stats", srcdir("src/collect_stats.py")) set_default("collect_stats", srcdir("src/collect_stats.py"))
...@@ -234,9 +237,10 @@ rule baserecal: ...@@ -234,9 +237,10 @@ rule baserecal:
expand("-knownSites {vcf}", vcf=config["known_sites"]) expand("-knownSites {vcf}", vcf=config["known_sites"])
), ),
region = "-L "+ config["restrict_BQSR"] if "restrict_BQSR" in config else "", region = "-L "+ config["restrict_BQSR"] if "restrict_BQSR" in config else "",
gatk_jar = config["gatk_jar"],
bams = bqsr_bam_input bams = bqsr_bam_input
container: containers["gatk"] container: containers["gatk"]
shell: "java -XX:ParallelGCThreads=1 -jar /usr/GenomeAnalysisTK.jar -T " shell: "java -XX:ParallelGCThreads=1 -jar {params.gatk_jar} -T "
"BaseRecalibrator {params.bams} -o {output} -nct 8 " "BaseRecalibrator {params.bams} -o {output} -nct 8 "
"-R {input.ref} -cov ReadGroupCovariate -cov QualityScoreCovariate " "-R {input.ref} -cov ReadGroupCovariate -cov QualityScoreCovariate "
"-cov CycleCovariate -cov ContextCovariate {params.known_sites} " "-cov CycleCovariate -cov ContextCovariate {params.known_sites} "
...@@ -268,12 +272,14 @@ rule gvcf_scatter: ...@@ -268,12 +272,14 @@ rule gvcf_scatter:
output: output:
gvcf = temp("{sample}/vcf/{sample}.{chunk}.g.vcf.gz"), gvcf = temp("{sample}/vcf/{sample}.{chunk}.g.vcf.gz"),
gvcf_tbi = temp("{sample}/vcf/{sample}.{chunk}.g.vcf.gz.tbi") gvcf_tbi = temp("{sample}/vcf/{sample}.{chunk}.g.vcf.gz.tbi")
params:
gatk_jar = config["gatk_jar"],
log: "log/{sample}/gvcf_scatter.{chunk}.log" log: "log/{sample}/gvcf_scatter.{chunk}.log"
wildcard_constraints: wildcard_constraints:
chunk = "[0-9]+" chunk = "[0-9]+"
container: containers["gatk"] container: containers["gatk"]
shell: "java -jar -Xmx4G -XX:ParallelGCThreads=1 /usr/GenomeAnalysisTK.jar " shell: "java -jar -Xmx4G -XX:ParallelGCThreads=1 {params.gatk_jar} -T "
"-T HaplotypeCaller -ERC GVCF -I " "HaplotypeCaller -ERC GVCF -I "
"{input.bam} -R {input.ref} -D {input.dbsnp} " "{input.bam} -R {input.ref} -D {input.dbsnp} "
"-L '{input.region}' -o '{output.gvcf}' " "-L '{input.region}' -o '{output.gvcf}' "
"-variant_index_type LINEAR -variant_index_parameter 128000 " "-variant_index_type LINEAR -variant_index_parameter 128000 "
...@@ -317,12 +323,13 @@ rule genotype_scatter: ...@@ -317,12 +323,13 @@ rule genotype_scatter:
output: output:
vcf = temp("{sample}/vcf/{sample}.{chunk}.vcf.gz"), vcf = temp("{sample}/vcf/{sample}.{chunk}.vcf.gz"),
vcf_tbi = temp("{sample}/vcf/{sample}.{chunk}.vcf.gz.tbi") vcf_tbi = temp("{sample}/vcf/{sample}.{chunk}.vcf.gz.tbi")
params:
gatk_jar = config["gatk_jar"]
log: "log/{sample}/genotype_scatter.{chunk}.log" log: "log/{sample}/genotype_scatter.{chunk}.log"
wildcard_constraints: wildcard_constraints:
chunk = "[0-9]+" chunk = "[0-9]+"
container: containers["gatk"] container: containers["gatk"]
shell: "java -jar -Xmx15G -XX:ParallelGCThreads=1 " shell: "java -jar -Xmx15G -XX:ParallelGCThreads=1 {params.gatk_jar} -T "
"/usr/GenomeAnalysisTK.jar -T "
"GenotypeGVCFs -R {input.ref} " "GenotypeGVCFs -R {input.ref} "
"-V {input.gvcf} -o '{output.vcf}' 2> {log}" "-V {input.gvcf} -o '{output.vcf}' 2> {log}"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment