Commit 7fc6f06e authored by van den Berg's avatar van den Berg
Browse files

Add the vcf index (tbi) to the pipeline output

parent 1bac00d0
Pipeline #3531 failed with stages
in 2 minutes and 9 seconds
......@@ -180,7 +180,9 @@ 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),
vcf_tbi=expand("{sample}/vcf/{sample}.vcf.gz.tbi",sample=SAMPLES),
gvcfs=expand("{sample}/vcf/{sample}.g.vcf.gz",sample=SAMPLES),
gvcf_tbi=expand("{sample}/vcf/{sample}.g.vcf.gz.tbi",sample=SAMPLES),
stats=metrics()
......@@ -377,10 +379,12 @@ rule gvcf_gather:
gvcfs = aggregate_gvcf,
tbis = aggregate_gvcf_tbi,
output:
gvcf = "{sample}/vcf/{sample}.g.vcf.gz"
gvcf = "{sample}/vcf/{sample}.g.vcf.gz",
gvcf_tbi = "{sample}/vcf/{sample}.g.vcf.gz.tbi"
singularity: containers["bcftools"]
shell: "bcftools concat {input.gvcfs} --allow-overlaps --output {output.gvcf} "
"--output-type z"
"--output-type z && "
"bcftools index --tbi --output-file {output.gvcf_tbi} {output.gvcf}"
rule genotype_scatter:
"""Run GATK's GenotypeGVCFs by chunk"""
......@@ -415,22 +419,14 @@ rule genotype_gather:
"""Gather all genotyping VCFs"""
input:
vcfs = aggregate_vcf,
tbi = aggregate_vcf_tbi
vcfs_tbi = aggregate_vcf_tbi
output:
vcf = "{sample}/vcf/{sample}.vcf.gz"
vcf = "{sample}/vcf/{sample}.vcf.gz",
vcf_tbi = "{sample}/vcf/{sample}.vcf.gz.tbi"
singularity: containers["bcftools"]
shell: "bcftools concat {input.vcfs} --allow-overlaps --output {output.vcf} "
"--output-type z"
rule genotype_gather_tbi:
"""Index genotyped vcf file"""
input:
vcf = "{sample}/vcf/{sample}.vcf.gz"
output:
tbi = "{sample}/vcf/{sample}.vcf.gz.tbi"
singularity: containers["tabix"]
shell: "tabix -pvcf {input.vcf}"
"--output-type z && "
"bcftools index --tbi --output-file {output.vcf_tbi} {output.vcf}"
## bam metrics
......
......@@ -76,6 +76,7 @@
files:
- path: "scatter/scatter-0.bed"
- path: "scatter/scatter-15.bed"
- path: "micro/vcf/micro.vcf.gz.tbi"
- path: "micro/vcf/micro.vcf.gz"
contains:
- "chrM\t152\t.\tT\tC\t3960.77\t."
......@@ -104,6 +105,7 @@
- "GT:AD:DP:GQ:PL:SB\t0/1:72,73,0:145:99:1909,0,1872,2125,2089,4214:35,37,36,37"
- "chrM\t16560\t.\tC\t<NON_REF>\t.\t.\tEND=16569\tGT:DP:GQ:MIN_DP:PL\t0/0:188:0:180:0,0,0"
- path: "micro/vcf/micro.g.vcf.gz.tbi"
- path: "micro/vcf/micro.0.vcf.gz"
should_exist: false
- path: "micro/vcf/micro.0.vcf.gz.tbi"
......
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