Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Remove gatk haplotypcaller #922

Merged
merged 8 commits into from
Apr 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions BALSAMIC/config/analysis.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@
"mutation": "somatic",
"type": "SNV"
},
"tnsnv": {
"mutation": "somatic",
"type": "SNV"
},
"tnhaplotyper": {
"mutation": "somatic",
"type": "SNV"
Expand All @@ -46,10 +42,6 @@
"mutation": "germline",
"type": "SV"
},
"haplotypecaller": {
"mutation": "germline",
"type": "SNV"
},
"vcfmerge":{
"mutation": "somatic",
"type": "SNV"
Expand Down
16 changes: 0 additions & 16 deletions BALSAMIC/config/cluster.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@
"time": "12:00:00",
"n": 5
},
"gatk_haplotypecaller": {
"time": "03:00:00",
"n": 10
},
"haplotypecaller_merge": {
"time": "01:30:00",
"n": 8
},
"manta_germline": {
"time": "05:00:00",
"n": 16
Expand Down Expand Up @@ -128,14 +120,6 @@
"time": "24:00:00",
"n": 24
},
"sentieon_TNsnv": {
"time": "24:00:00",
"n": 24
},
"sentieon_TNsnv_tumor_only": {
"time": "24:00:00",
"n": 24
},
"sentieon_align_sort": {
"time": "24:00:00",
"n": 24
Expand Down
63 changes: 0 additions & 63 deletions BALSAMIC/snakemake_rules/variant_calling/germline.rule
Original file line number Diff line number Diff line change
@@ -1,69 +1,6 @@
# vim: syntax=python tabstop=4 expandtab
# coding: utf-8



rule gatk_haplotypecaller:
input:
fa = config["reference"]["reference_genome"],
bam = bam_dir + "{sample_type}.merged.bam",
bed = vcf_dir + "split_bed/{bedchrom}." + capture_kit,
output:
vcf_dir + "haplotypecaller/split_vcf/{sample_type}.{bedchrom}_haplotypecaller.vcf.gz"
benchmark:
Path(benchmark_dir,'gatk_haplotypecaller_' + "{sample_type}.{bedchrom}.tsv").as_posix()
singularity:
Path(singularity_image, config["bioinfo_tools"].get("gatk") + ".sif").as_posix()
params:
tmpdir = tempfile.mkdtemp(prefix=tmp_dir),
sample = '{sample_type}',
gatk_path = '/opt/conda/opt/gatk-3.8'
threads:
get_threads(cluster_config,'gatk_haplotypecaller')
message:
("Calling germline variants using gatk haplotypecaller for {params.sample}")
shell:
"""
mkdir -p {params.tmpdir};
export TMPDIR={params.tmpdir};

java -jar -Djava.io.tmpdir={params.tmpdir} -Xms8G -Xmx32G {params.gatk_path}/GenomeAnalysisTK.jar \
-T HaplotypeCaller \
-R {input.fa} \
-I {input.bam} \
-L {input.bed} \
| bgzip > {output};

rm -rf {params.tmpdir};
"""


rule haplotypecaller_merge:
input:
expand(vcf_dir + "haplotypecaller/split_vcf/{{sample_type}}.{chrom}_haplotypecaller.vcf.gz", chrom=chromlist)
output:
vcf_dir + "SNV.germline.{sample_type}.haplotypecaller.vcf.gz"
benchmark:
Path(benchmark_dir, 'haplotypecaller_merge_' + "SNV.germline.{sample_type}.tsv").as_posix()
singularity:
Path(singularity_image, config["bioinfo_tools"].get("gatk") + ".sif").as_posix()
params:
tmpdir = tempfile.mkdtemp(prefix = tmp_dir),
sample = '{sample_type}'
message:
"Concatenating haplotyper outputs from multiple VCF files using bcftools for {params.sample}"
shell:
"""
mkdir -p {params.tmpdir};
export TMPDIR={params.tmpdir};

bcftools concat {input} | bcftools sort --temp-dir {params.tmpdir} - | bgzip > {output};
tabix -f -p vcf {output};

rm -rf {params.tmpdir};
"""


rule sentieon_DNAscope:
input:
bam = bam_dir + "{sample_type}.merged.bam",
Expand Down
1 change: 0 additions & 1 deletion BALSAMIC/utils/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ class VCFModel(BaseModel):
tnscope: VarcallerAttribute
dnascope: VarcallerAttribute
tnhaplotyper: VarcallerAttribute
haplotypecaller: VarcallerAttribute
TNscope_umi: VarcallerAttribute
manta_germline: VarcallerAttribute
manta: VarcallerAttribute
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Removed
* bcftools_stats from vep #898
* QC delivery report workflow (generating the ``<case>_qc_report.html`` file) #878
* ``--sample-id-map`` and ``--case-id-map`` flags from the ``balsamic report deliver`` command #878
* Removed `gatk_haplotypecaller` for reporting panel germline variants #918

[8.2.10]
--------
Expand Down
2 changes: 0 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,11 +603,9 @@ def sample_config():
"vardict": {"mutation": "somatic", "type": "SNV"},
"mutect": {"mutation": "somatic", "type": "SNV"},
"tnscope": {"mutation": "somatic", "type": "SNV"},
"tnsnv": {"mutation": "somatic", "type": "SNV"},
"tnhaplotyper": {"mutation": "somatic", "type": "SNV"},
"dnascope": {"mutation": "germline", "type": "SNV"},
"manta_germline": {"mutation": "germline", "type": "SV"},
"haplotypecaller": {"mutation": "germline", "type": "SNV"},
},
"samples": {
"S1_R": {
Expand Down
24 changes: 0 additions & 24 deletions tests/test_data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,12 @@
"merged": "manta_germline.vcf.gz",
"type": "SV"
},
"strelka_germline": {
"default": ["variants.vcf.gz", "germline.S1.vcf.gz"],
"mutation": "germline",
"merged": "strelka_germline.vcf.gz",
"type": "SNV"
},
"strelka": {
"default": ["somatic.snvs.vcf.gz", "somatic.indels.vcf.gz"],
"mutation": "somatic",
"merged": "strelka.vcf.gz",
"type": "SNV"
},
"mutect": {
"default": "mutect.vcf.gz",
"mutation": "somatic",
"merged": "mutect.vcf.gz",
"type": "SNV"
},
"freebayes": {
"default": "freebayes.vcf.gz",
"mutation": "germline",
"merged": "freebayes.vcf.gz",
"type": "SNV"
},
"haplotypecaller": {
"default": "haplotypecaller.vcf.gz",
"mutation": "germline",
"merged": "haplotypecaller.vcf.gz",
"type": "SNV"
},
"vardict": {
"default": "vardict.vcf.gz",
"mutation": "somatic",
Expand Down