[meta]
name = "deepvariant"
category = "variant-calling"
description = "Deep learning-based germline variant caller from Google DeepMind for SNPs and indels"
tags = ["variant-calling", "deep-learning", "snp", "indel", "germline", "vcf", "illumina", "pacbio", "nanopore"]
author = "oxo-call built-in"
source_url = "https://github.com/google/deepvariant"

[context]
concepts = [
    "DeepVariant uses a deep convolutional neural network to call SNPs and indels from aligned reads.",
    "Run as a Docker/Singularity container or via the run_deepvariant.py script (recommended for ease of use).",
    "Use --model_type to specify data type: WGS, WES, PACBIO, ONT, HYBRID_PACBIO_ILLUMINA.",
    "Input: --input_bam (sorted, indexed BAM/CRAM); --ref (reference FASTA with .fai index).",
    "Output: --output_vcf for VCF, --output_gvcf for GVCF (for joint genotyping with GLnexus).",
    "Use --num_shards N to parallelize across CPU cores (N = number of CPUs available).",
    "DeepVariant outputs PASS-filtered variants in the VCF FILTER column — use bcftools filter -f PASS.",
    "For joint genotyping of multiple samples, use GLnexus to merge per-sample gVCFs.",
]

pitfalls = [
    "DeepVariant model type must match the sequencing platform — using wrong model significantly reduces accuracy.",
    "The reference FASTA must match the genome build used for alignment exactly.",
    "GPU acceleration requires the GPU Docker image and NVIDIA Docker — much faster than CPU.",
    "DeepVariant outputs both PASS and non-PASS variants — filter with bcftools filter -f PASS for high-confidence calls.",
    "The --output_gvcf is needed for multi-sample analysis — don't skip it in cohort studies.",
    "DeepVariant is germline only — use other tools (Mutect2, Strelka2) for somatic variant calling.",
]

[[examples]]
task = "call variants from Illumina WGS data using DeepVariant"
args = "run_deepvariant --model_type WGS --ref reference.fa --input_bam sorted.bam --output_vcf output.vcf --output_gvcf output.g.vcf --num_shards 16"
explanation = "--model_type WGS for Illumina whole-genome; --num_shards 16 parallel CPU shards"

[[examples]]
task = "call variants from PacBio HiFi data"
args = "run_deepvariant --model_type PACBIO --ref reference.fa --input_bam hifi_sorted.bam --output_vcf pacbio_variants.vcf --output_gvcf pacbio.g.vcf --num_shards 16"
explanation = "--model_type PACBIO for CCS/HiFi reads; dedicated model for long high-accuracy reads"

[[examples]]
task = "call variants from Oxford Nanopore reads"
args = "run_deepvariant --model_type ONT --ref reference.fa --input_bam ont_sorted.bam --output_vcf ont_variants.vcf --output_gvcf ont.g.vcf --num_shards 16"
explanation = "--model_type ONT for Nanopore reads; trained on ONT-specific error profiles"

[[examples]]
task = "call variants from WES data"
args = "run_deepvariant --model_type WES --ref reference.fa --input_bam wes_sorted.bam --regions targets.bed --output_vcf wes_variants.vcf --output_gvcf wes.g.vcf --num_shards 8"
explanation = "--model_type WES for whole-exome; --regions restricts calling to target BED regions"
