GATK GENOTYPEGVCFS¶
Run gatk GenotypeGVCFs.
Software dependencies¶
- gatk4 ==4.1.4.1
Example¶
This wrapper can be used in the following way:
rule genotype_gvcfs:
input:
gvcf="calls/all.g.vcf", # combined gvcf over multiple samples
ref="genome.fasta"
output:
vcf="calls/all.vcf",
log:
"logs/gatk/genotypegvcfs.log"
params:
extra="", # optional
java_opts="", # optional
wrapper:
"0.47.0/bio/gatk/genotypegvcfs"
Note that input, output and log file paths can be chosen freely. When running with
snakemake --use-conda
the software dependencies will be automatically deployed into an isolated environment before execution.
Notes¶
- The java_opts param allows for additional arguments to be passed to the java compiler, e.g. “-Xmx4G” for one, and “-Xmx4G -XX:ParallelGCThreads=10” for two options.
- The extra param alllows for additional program arguments.
- For more inforamtion see, https://software.broadinstitute.org/gatk/documentation/article?id=11050
Authors¶
- Johannes Köster
- Jake VanCampen
Code¶
__author__ = "Johannes Köster"
__copyright__ = "Copyright 2018, Johannes Köster"
__email__ = "johannes.koester@protonmail.com"
__license__ = "MIT"
import os
from snakemake.shell import shell
extra = snakemake.params.get("extra", "")
java_opts = snakemake.params.get("java_opts", "")
log = snakemake.log_fmt_shell(stdout=True, stderr=True)
shell(
"gatk --java-options '{java_opts}' GenotypeGVCFs {extra} "
"-V {snakemake.input.gvcf} "
"-R {snakemake.input.ref} "
"-O {snakemake.output.vcf} {log}"
)