Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Klinische Genetica
capture-lumc
hutspot
Commits
bcd99d28
Commit
bcd99d28
authored
Apr 06, 2020
by
van den Berg
Browse files
Add g.vcf file to default output of the pipeline
Als include some tests for the content of the g.vcf file
parent
2d7fe358
Pipeline
#3517
failed with stages
in 2 minutes and 11 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Snakefile
View file @
bcd99d28
...
...
@@ -174,6 +174,7 @@ rule all:
report="multiqc_report/multiqc_report.html",
bais=expand("{sample}/bams/{sample}.markdup.bam.bai",sample=SAMPLES),
vcfs=expand("{sample}/vcf/{sample}.vcf.gz",sample=SAMPLES),
gvcfs=expand("{sample}/vcf/{sample}.g.vcf.gz",sample=SAMPLES),
stats=metrics()
...
...
@@ -352,6 +353,26 @@ rule gvcf_scatter:
"-variant_index_type LINEAR -variant_index_parameter 128000 "
"-BQSR {input.bqsr}"
def aggregate_gvcf(wildcards):
checkpoint_output = checkpoints.scatterregions.get(**wildcards).output[0]
return expand("{{sample}}/vcf/{{sample}}.{i}.g.vcf.gz",
i=glob_wildcards(os.path.join(checkpoint_output, 'scatter-{i}.bed')).i)
def aggregate_gvcf_tbi(wildcards):
checkpoint_output = checkpoints.scatterregions.get(**wildcards).output[0]
return expand("{{sample}}/vcf/{{sample}}.{i}.g.vcf.gz.tbi",
i=glob_wildcards(os.path.join(checkpoint_output, 'scatter-{i}.bed')).i)
rule gvcf_gather:
""" Join the gvcf files together """
input:
gvcfs = aggregate_gvcf,
tbis = aggregate_gvcf_tbi,
output:
gvcf = "{sample}/vcf/{sample}.g.vcf.gz"
singularity: containers["bcftools"]
shell: "bcftools concat {input.gvcfs} --allow-overlaps --output {output.gvcf} "
"--output-type z"
rule genotype_scatter:
"""Run GATK's GenotypeGVCFs by chunk"""
...
...
@@ -370,7 +391,7 @@ rule genotype_scatter:
"-V {input.gvcf} -o '{output.vcf}'"
def aggregate_
input
(wildcards):
def aggregate_
vcf
(wildcards):
checkpoint_output = checkpoints.scatterregions.get(**wildcards).output[0]
return expand("{{sample}}/vcf/{{sample}}.{i}.vcf.gz",
i=glob_wildcards(os.path.join(checkpoint_output, 'scatter-{i}.bed')).i)
...
...
@@ -379,7 +400,7 @@ def aggregate_input(wildcards):
rule genotype_gather:
"""Gather all genotyping VCFs"""
input:
vcfs = aggregate_
input
vcfs = aggregate_
vcf
output:
vcf = "{sample}/vcf/{sample}.vcf.gz"
singularity: containers["bcftools"]
...
...
tests/test_dry_run.yml
View file @
bcd99d28
...
...
@@ -13,6 +13,8 @@
contains
:
-
"
Job
counts"
-
"
localrule
all:"
-
"
output:
micro/vcf/micro.vcf.gz"
-
"
output:
micro/vcf/micro.g.vcf.gz"
must_not_contain
:
-
"
rror"
stderr
:
...
...
tests/test_integration_run.yml
View file @
bcd99d28
...
...
@@ -31,8 +31,21 @@
-
"
chrM
\t
4745
\t
.
\t
A
\t
G
\t
5655.77
\t
."
-
"
GT:AD:DP:GQ:PGT:PID:PL
\t
1/1:1,133:134:99:1|1:4745_A_G:5684,404,0"
-
"
chrM
\t
4769
\t
.
\t
A
\t
G
\t
5182.77
\t
."
-
"
GT:AD:DP:GQ:PGT:PID:PL
\t
1/1:1,120:121:99:1|1:4745_A_G:5211,363,0"
-
"
chrM
\t
16023
\t
.
\t
G
\t
A
\t
1880.77
\t
."
-
"
GT:AD:DP:GQ:PL
\t
0/1:72,73:145:99:1909,0,1872"
-
path
:
"
micro/vcf/micro.g.vcf.gz"
contains
:
-
"
chrM
\t
1
\t
.
\t
G
\t
<NON_REF>
\t
.
\t
.
\t
END=151
\t
GT:DP:GQ:MIN_DP:PL
\t
0/0:165:99:137:0,120,1800"
-
"
chrM
\t
152
\t
.
\t
T
\t
C,<NON_REF>
\t
3960.77"
-
"
GT:AD:DP:GQ:PL:SB
\t
1/1:0,130,0:130:99:3989,388,0,3989,388,3989:0,0,47,83"
-
"
chrM
\t
16023
\t
.
\t
G
\t
A,<NON_REF>
\t
1880.77
\t
."
-
"
GT:AD:DP:GQ:PL:SB
\t
0/1:72,73,0:145:99:1909,0,1872,2125,2089,4214:35,37,36,37"
-
"
chrM
\t
16560
\t
.
\t
C
\t
<NON_REF>
\t
.
\t
.
\t
END=16569
\t
GT:DP:GQ:MIN_DP:PL
\t
0/0:188:0:180:0,0,0"
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment