GATK SELECTVARIANTS¶
Run gatk SelectVariants.
Software dependencies¶
- gatk4 ==4.0.5.1
Example¶
This wrapper can be used in the following way:
rule gatk_select:
input:
vcf="calls/all.vcf",
ref="genome.fasta",
output:
vcf="calls/snvs.vcf"
log:
"logs/gatk/select/snvs.log"
params:
extra="--select-type-to-include SNP", # optional filter arguments, see GATK docs
wrapper:
"0.27.1/bio/gatk/selectvariants"
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.
Authors¶
- Johannes Köster
Code¶
__author__ = "Johannes Köster"
__copyright__ = "Copyright 2018, Johannes Köster"
__email__ = "johannes.koester@protonmail.com"
__license__ = "MIT"
from snakemake.shell import shell
extra = snakemake.params.get("extra", "")
log = snakemake.log_fmt_shell(stdout=True, stderr=True)
shell("gatk SelectVariants -R {snakemake.input.ref} -V {snakemake.input.vcf} "
"{extra} -O {snakemake.output.vcf} {log}")