Variant Calling
HaplotypeCaller writes one line for every position where it thinks HG002 differs from the reference, and it attaches a set of annotations to each line that say how it reached the call. This page reads that file field by field, before any filter has touched it. The question is what the caller called and how sure it was.
The file is the raw VCF from the nf-core/sarek run,
variant_calling/haplotypecaller/HG002/HG002.haplotypecaller.vcf.gz, and the image keeps
a copy under /opt/data/variant_calling/haplotypecaller/. The
HaplotypeCaller source
calls this output “A raw, unfiltered, highly sensitive callset”. Sarek writes a
.filtered copy beside it, and the Filtering page reads
that one. The VCF page covers the format in general.
The header
Section titled “The header”The HG002 inputs come from NIST and the Genome in a Bottle consortium. The preparation on October 29, 2026 selects the chromosome 20 interval, subsets the GIAB v4.2.1 benchmark, and produces fresh analysis outputs. The source and terms notice identifies the original sequencing and benchmark publications, the exact source files, and the changes. It also records the grants for the Broad reference bundle and Ensembl release 99 annotation.
HC=/opt/data/variant_calling/haplotypecaller/HG002.haplotypecaller.vcf.gz
# Header lines start with ##. Every line that does not start with # is a record.bcftools view --no-version -h "$HC" | grep -c '^##'bcftools view -H "$HC" | wc -l271807Most of the header lines define fields, and a few describe the file itself.
bcftools view --no-version -h "$HC" \ | grep -E '^##(fileformat|source|FILTER|contig)='bcftools view --no-version -h "$HC" | tail -n 1##fileformat=VCFv4.2##FILTER=<ID=PASS,Description="All filters passed">##FILTER=<ID=LowQual,Description="Low quality">##contig=<ID=chr20,length=64444167>##source=HaplotypeCaller#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT HG002_HG002The single contig line is chr20, because the reference holds chr20 alone. The header
declares PASS and LowQual, but HaplotypeCaller fills in no FILTER value, so every record
carries a dot in that column. The last line names the one sample column, HG002_HG002,
which sarek builds from the patient and sample columns of the samplesheet.
One header line holds the full HaplotypeCaller command, with every default spelled out. Four of its settings decide what can reach this file.
bcftools view --no-version -h "$HC" \ | grep '^##GATKCommandLine=<ID=HaplotypeCaller' \ | grep -oE \ -e '--pcr-indel-model [^ ]+' \ -e '--standard-min-confidence-threshold-for-calling [^ ]+' \ -e '--sample-ploidy [^ ]+' \ -e '--output-mode [^ ]+'--pcr-indel-model NONE--standard-min-confidence-threshold-for-calling 30.0--sample-ploidy 2--output-mode EMIT_VARIANTS_ONLYEMIT_VARIANTS_ONLY means the file holds variant sites and none of the reference blocks
that a GVCF would carry. No site with a QUAL below the confidence threshold of 30 is
written at all, so a later filter on QUAL < 30 has nothing to remove. The ploidy of 2 is
the diploid model.
Why the PCR indel model is NONE
Section titled “Why the PCR indel model is NONE”The polymerase in library PCR slips in homopolymers and short tandem repeats, and the
slips reach the reads as indels that are not in the genome. HaplotypeCaller can expect
those errors. Its
likelihood engine
caps the insertion and deletion qualities of each base by the length of the repeat it sits
in, so an indel inside a long repeat looks more like an error and counts for less. The
CONSERVATIVE level, sarek’s default, “tries to maintain a high true positive rate at the
expense of allowing more false positives”. AGGRESSIVE and HOSTILE give up more true
positives, and under NONE “no specialized PCR error model will be applied”.
The HG002 reads come from PCR-free libraries. The GIAB
library README
names the Illumina TruSeq (LT) DNA PCR-Free Sample Prep Kit, FC-121-3001, and the
HaplotypeCaller documentation says “When working with PCR-free data, be sure to set
-pcr_indel_model NONE”. A PCR model on these reads would discount real indels in
repeats to correct for errors that the library never made. The run therefore passes
--gatk_pcr_indel_model NONE to sarek, and the command line above shows that it reached
HaplotypeCaller. The Experimental design page
covers the library side of the same choice.
The annotations
Section titled “The annotations”The INFO column describes the site. These seven annotations are the ones a filter reads.
bcftools view --no-version -h "$HC" \ | grep -E '^##INFO=<ID=(DP|QD|FS|SOR|MQ|MQRankSum|ReadPosRankSum),'##INFO=<ID=DP,Number=1,Type=Integer,Description="Approximate read depth; some reads may have been filtered">##INFO=<ID=FS,Number=1,Type=Float,Description="Phred-scaled p-value using Fisher's exact test to detect strand bias">##INFO=<ID=MQ,Number=1,Type=Float,Description="RMS Mapping Quality">##INFO=<ID=MQRankSum,Number=1,Type=Float,Description="Z-score From Wilcoxon rank sum test of Alt vs. Ref read mapping qualities">##INFO=<ID=QD,Number=1,Type=Float,Description="Variant Confidence/Quality by Depth">##INFO=<ID=ReadPosRankSum,Number=1,Type=Float,Description="Z-score from Wilcoxon rank sum test of Alt vs. Ref read position bias">##INFO=<ID=SOR,Number=1,Type=Float,Description="Symmetric Odds Ratio of 2x2 contingency table to detect strand bias">| Field | What it measures | Suspicious when |
|---|---|---|
DP |
the reads at the site, counted before the caller sets aside reads that do not inform the genotype | far above or below the mean depth |
QD |
QUAL divided by the summed allele depths of the sample | low: the evidence is weak for the number of reads |
FS |
strand bias as a Phred-scaled Fisher exact test p-value | high: the ALT allele comes from one strand |
SOR |
strand bias as a symmetric odds ratio | high, for the same reason |
MQ |
the root mean square mapping quality of the reads | below 60, the BWA maximum: some reads may belong elsewhere |
MQRankSum |
ALT reads against REF reads, by mapping quality | strongly negative: the ALT reads map worse |
ReadPosRankSum |
ALT reads against REF reads, by position in the read | strongly negative: the ALT sits near read ends |
The FORMAT column holds the genotype of the sample and the evidence for it.
bcftools view --no-version -h "$HC" | grep '^##FORMAT'##FORMAT=<ID=AD,Number=R,Type=Integer,Description="Allelic depths for the ref and alt alleles in the order listed">##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Approximate read depth (reads with MQ=255 or with bad mates are filtered)">##FORMAT=<ID=GQ,Number=1,Type=Integer,Description="Genotype Quality">##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">##FORMAT=<ID=PL,Number=G,Type=Integer,Description="Normalized, Phred-scaled likelihoods for genotypes as defined in the VCF specification">| Field | Meaning |
|---|---|
GT |
the genotype: 0/1 heterozygous, 1/1 homozygous ALT, 1/2 two different ALT alleles |
AD |
reads supporting REF, then each ALT |
DP |
the informative reads behind the genotype |
PL |
Phred-scaled likelihoods of each genotype, shifted so the best one is 0 |
GQ |
confidence in the chosen genotype, capped at 99 |
One record, decoded
Section titled “One record, decoded”The first record below is a heterozygous SNV, and the second is a homozygous one just upstream of it.
bcftools view -H -r chr20:10002161 "$HC"bcftools view -H -r chr20:10002077 "$HC"chr20 10002161 rs11906973 A T 692.64 . AC=1;AF=0.5;AN=2;BaseQRankSum=1.01;DB;DP=49;ExcessHet=0;FS=11.452;MLEAC=1;MLEAF=0.5;MQ=60;MQRankSum=0;QD=15.06;ReadPosRankSum=-0.455;SOR=2.062 GT:AD:DP:GQ:PL 0/1:26,20:46:99:700,0,883chr20 10002077 rs6057071 G A 2420.06 . AC=2;AF=1;AN=2;DB;DP=58;ExcessHet=0;FS=0;MLEAC=2;MLEAF=1;MQ=60;QD=25.36;SOR=1.823 GT:AD:DP:GQ:PL 1/1:0,57:57:99:2434,172,0Read the first line from left to right. The ID rs11906973 comes from the dbSNP file that
sarek passes with --dbsnp, and the DB flag says the same thing. QUAL is 692.64, the
Phred-scaled confidence that the site carries some ALT allele. The genotype is 0/1, with
26 reads for A and 20 for T, and the PL values 700,0,883 say that 0/1 is the most likely
genotype by a wide margin. The next best genotype, 0/0, sits 700 Phred units behind it.
GQ is that gap, capped at 99.
The strand annotations disagree a little. FS is 11.452, so the T reads lean toward one strand, while SOR is 2.062. Every read has a mapping quality of 60, so MQ is 60 and MQRankSum is 0. ReadPosRankSum is -0.455, so the T sits in the same part of the reads as the A. Nothing here looks like an artifact.
The second line is a 1/1 call with 57 reads for A and none for G. It has no
MQRankSum, BaseQRankSum or ReadPosRankSum, because a rank sum test compares REF reads with
ALT reads and this site has no REF reads. Its QD is not QUAL over depth either.
# QD is QUAL over the summed allele depths, until that ratio passes 35bcftools query -r chr20:10002077,chr20:10002161 \ -f '%POS\t%QUAL\t%INFO/QD\t[%AD]\n' "$HC" \ | awk -F'\t' '{ split($4, ad, ",") printf "%s QUAL/AD=%.2f QD=%s\n", $1, $2 / (ad[1] + ad[2]), $3 }'
# Records with no MQRankSum, by genotypebcftools query -i 'INFO/MQRankSum="."' -f '[%GT]\n' "$HC" | sort | uniq -c10002077 QUAL/AD=42.46 QD=25.3610002161 QUAL/AD=15.06 QD=15.06 2 0/1 636 1/1 44 1/2For the heterozygous call QD is exactly QUAL over the 46 reads. For the homozygous one
the ratio is 42.46, and GATK’s
QualByDepth
replaces any value of 35 or more with 30 plus Gaussian noise with a standard deviation of
3, which gives 25.36 here. Missing rank sums are the rule for homozygous calls, as the
counts show, so a filter on them never touches most 1/1 records.
What the call set holds
Section titled “What the call set holds”The tabs count the records by type and genotype, and summarize QUAL, GQ and the FORMAT
DP. A record is an SNV when its REF and every ALT are one base long, an indel when every
ALT changes the length, and mixed otherwise. Both tabs ignore the * allele, which marks
a deletion that starts upstream and spans the position, and both print the same values.
suppressPackageStartupMessages({ library(VariantAnnotation) library(ggplot2)})
hc_path <- file.path( "/opt/data/variant_calling/haplotypecaller", "HG002.haplotypecaller.vcf.gz")vcf <- readVcf(hc_path)
#' Summarize a numeric vector as six statistics.#'#' @param values A numeric vector with no missing values.#' @return A character vector with the minimum, first quartile, median, mean,#' third quartile and maximum, each with two decimals.SummarizeValues <- function(values) { stats <- c( min(values), quantile(values, 0.25, names = FALSE), median(values), mean(values), quantile(values, 0.75, names = FALSE), max(values) ) sprintf("%.2f", stats)}
#' Return the second lowest value of a vector.#'#' @param pl The PL values of one genotype.#' @return The second lowest PL value.SecondLowest <- function(pl) { sort(pl)[2]}
# VariantAnnotation reads the * allele as an empty string, so drop the# empty alleles before typing each record.ref_width <- nchar(ref(vcf))alt_width <- nchar(alt(vcf))alt_width <- alt_width[alt_width > 0]is_snv <- ref_width == 1 & all(alt_width == 1)is_indel <- all(alt_width != ref_width)variant_class <- ifelse(is_snv, "SNV", ifelse(is_indel, "indel", "mixed"))
genotype <- geno(vcf)$GT[, 1]gq <- geno(vcf)$GQ[, 1]dp <- geno(vcf)$DP[, 1]pl_second <- vapply(geno(vcf)$PL[, 1], SecondLowest, integer(1))has_rsid <- grepl("^rs", rownames(vcf))
cat(sprintf("records: %d\n", nrow(vcf)))for (level in c("SNV", "indel", "mixed")) { cat(sprintf("%s: %d\n", level, sum(variant_class == level)))}for (level in sort(unique(genotype))) { cat(sprintf("GT %s: %d\n", level, sum(genotype == level)))}cat(sprintf("multiallelic: %d\n", sum(lengths(alt(vcf)) > 1)))cat(sprintf( "rsID in the ID column: %d (%.1f%%)\n", sum(has_rsid), 100 * mean(has_rsid)))cat(sprintf("GQ at the cap of 99: %d\n", sum(gq == 99)))cat(sprintf( "GQ equal to the second lowest PL, capped at 99: %d\n", sum(gq == pmin(99L, pl_second))))
cat("\n")cat(sprintf( "%-5s%s\n", "field", paste(sprintf("%9s", c("min", "q1", "median", "mean", "q3", "max")), collapse = "")))fields <- list(QUAL = qual(vcf), GQ = gq, DP = dp)for (field in names(fields)) { stats <- SummarizeValues(fields[[field]]) cat(sprintf("%-5s%s\n", field, paste(sprintf("%9s", stats), collapse = "")))}
# The gate compares these values with the Python tab.metrics <- list( records = nrow(vcf), snv = sum(variant_class == "SNV"), indel = sum(variant_class == "indel"), mixed = sum(variant_class == "mixed"), gt_het = sum(genotype == "0/1"), gt_hom_alt = sum(genotype == "1/1"), gt_het_alt = sum(genotype == "1/2"), multiallelic = sum(lengths(alt(vcf)) > 1), rsid = sum(has_rsid), gq_at_cap = sum(gq == 99), gq_from_pl = sum(gq == pmin(99L, pl_second)), qual_q1 = quantile(qual(vcf), 0.25, names = FALSE), qual_median = median(qual(vcf)), qual_mean = mean(qual(vcf)), qual_q3 = quantile(qual(vcf), 0.75, names = FALSE), gq_mean = mean(gq), dp_median = median(dp), dp_mean = mean(dp))dir.create("outputs", showWarnings = FALSE, recursive = TRUE)jsonlite::write_json( metrics, "outputs/variant-calling_metrics_r.json", auto_unbox = TRUE, digits = NA)records: 1807SNV: 1450indel: 351mixed: 6GT 0/1: 1097GT 1/1: 660GT 1/2: 50multiallelic: 50rsID in the ID column: 1713 (94.8%)GQ at the cap of 99: 1724GQ equal to the second lowest PL, capped at 99: 1807
field min q1 median mean q3 maxQUAL 40.64 844.62 1154.64 1405.37 1982.56 3665.03GQ 0.00 99.00 99.00 97.44 99.00 99.00DP 2.00 45.50 55.00 53.58 64.00 93.00import jsonfrom pathlib import Path
import numpy as npimport pandas as pdfrom cyvcf2 import VCF
HC_PATH = ( "/opt/data/variant_calling/haplotypecaller/" "HG002.haplotypecaller.vcf.gz")
def classify_record(ref, alts): """Return the variant class of one VCF record.
Args: ref: The REF allele. alts: The ALT alleles of the record.
Returns: "SNV" when REF and every ALT are one base long, "indel" when every ALT changes the length, and "mixed" otherwise. The * allele is ignored. """ called = [alt for alt in alts if alt != "*"] if len(ref) == 1 and all(len(alt) == 1 for alt in called): return "SNV" if all(len(alt) != len(ref) for alt in called): return "indel" return "mixed"
def summarize_values(values): """Summarize numbers as six statistics.
Args: values: A sequence of numbers with no missing values.
Returns: A list with the minimum, first quartile, median, mean, third quartile and maximum, each formatted with two decimals. """ array = np.asarray(values, dtype=float) stats = [ array.min(), np.percentile(array, 25), np.median(array), array.mean(), np.percentile(array, 75), array.max(), ] return [f"{value:.2f}" for value in stats]
rows = []for variant in VCF(HC_PATH): first, second, _ = variant.genotypes[0] rows.append({ "variant_class": classify_record(variant.REF, variant.ALT), "genotype": f"{first}/{second}", "n_alt": len(variant.ALT), "has_rsid": (variant.ID or "").startswith("rs"), # cyvcf2 holds QUAL as a 32-bit float. Rounding to the two decimals # in the file gives back the value that R reads. "qual": round(variant.QUAL, 2), "gq": int(variant.format("GQ")[0][0]), "dp": int(variant.format("DP")[0][0]), "pl_second": int(sorted(variant.format("PL")[0])[1]), })calls = pd.DataFrame(rows)
print(f"records: {len(calls)}")for level in ["SNV", "indel", "mixed"]: print(f"{level}: {(calls['variant_class'] == level).sum()}")for level in sorted(calls["genotype"].unique()): print(f"GT {level}: {(calls['genotype'] == level).sum()}")print(f"multiallelic: {(calls['n_alt'] > 1).sum()}")print( f"rsID in the ID column: {calls['has_rsid'].sum()} " f"({100 * calls['has_rsid'].mean():.1f}%)")print(f"GQ at the cap of 99: {(calls['gq'] == 99).sum()}")gq_expected = calls["pl_second"].clip(upper=99)print( "GQ equal to the second lowest PL, capped at 99: " f"{(calls['gq'] == gq_expected).sum()}")
print()header = ["min", "q1", "median", "mean", "q3", "max"]print(f"{'field':<5}" + "".join(f"{name:>9}" for name in header))for field, column in [("QUAL", "qual"), ("GQ", "gq"), ("DP", "dp")]: stats = summarize_values(calls[column]) print(f"{field:<5}" + "".join(f"{value:>9}" for value in stats))
# The gate compares these values with the R tab.metrics = { "records": len(calls), "snv": int((calls["variant_class"] == "SNV").sum()), "indel": int((calls["variant_class"] == "indel").sum()), "mixed": int((calls["variant_class"] == "mixed").sum()), "gt_het": int((calls["genotype"] == "0/1").sum()), "gt_hom_alt": int((calls["genotype"] == "1/1").sum()), "gt_het_alt": int((calls["genotype"] == "1/2").sum()), "multiallelic": int((calls["n_alt"] > 1).sum()), "rsid": int(calls["has_rsid"].sum()), "gq_at_cap": int((calls["gq"] == 99).sum()), "gq_from_pl": int((calls["gq"] == gq_expected).sum()), "qual_q1": float(np.percentile(calls["qual"], 25)), "qual_median": float(np.median(calls["qual"])), "qual_mean": float(calls["qual"].mean()), "qual_q3": float(np.percentile(calls["qual"], 75)), "gq_mean": float(calls["gq"].mean()), "dp_median": float(np.median(calls["dp"])), "dp_mean": float(calls["dp"].mean()),}Path("outputs").mkdir(exist_ok=True)Path("outputs/variant-calling_metrics_python.json").write_text( json.dumps(metrics, indent=2) + "\n")records: 1807SNV: 1450indel: 351mixed: 6GT 0/1: 1097GT 1/1: 660GT 1/2: 50multiallelic: 50rsID in the ID column: 1713 (94.8%)GQ at the cap of 99: 1724GQ equal to the second lowest PL, capped at 99: 1807
field min q1 median mean q3 maxQUAL 40.64 844.62 1154.64 1405.37 1982.56 3665.03GQ 0.00 99.00 99.00 97.44 99.00 99.00DP 2.00 45.50 55.00 53.58 64.00 93.00QUAL by genotype
Section titled “QUAL by genotype”genotype_labels <- c( "0/1" = "0/1, heterozygous", "1/1" = "1/1, homozygous ALT", "1/2" = "1/2, two different ALT alleles")qual_data <- data.frame( qual = qual(vcf), genotype = factor(genotype_labels[genotype], levels = genotype_labels))genotype_colors <- setNames( c("#2a78d6", "#eb6834", "#1baf7a"), genotype_labels)
# The dashed line is the calling threshold of 30, below which HaplotypeCaller# writes nothing.qual_plot <- ggplot(qual_data, aes(x = qual, fill = genotype)) + geom_histogram(bins = 40, colour = "white", linewidth = 0.2) + geom_vline(xintercept = 30, linetype = "dashed", colour = "grey40") + scale_x_log10(labels = scales::label_comma()) + scale_fill_manual(values = genotype_colors, guide = "none") + facet_wrap(~ genotype, ncol = 1, scales = "free_y") + labs(x = "QUAL, log scale", y = "Records") + theme_minimal(base_size = 12) + theme(panel.grid.minor = element_blank())
dir.create("outputs", showWarnings = FALSE, recursive = TRUE)ggsave( "outputs/variant-calling_qual_r.png", plot = qual_plot, width = 7, height = 6, dpi = 150, bg = "white")
import matplotlib.pyplot as plt
GENOTYPE_LABELS = { "0/1": "0/1, heterozygous", "1/1": "1/1, homozygous ALT", "1/2": "1/2, two different ALT alleles",}GENOTYPE_COLORS = {"0/1": "#2a78d6", "1/1": "#eb6834", "1/2": "#1baf7a"}
bins = np.logspace( np.log10(calls["qual"].min()), np.log10(calls["qual"].max()), 41)figure, axes = plt.subplots(3, 1, figsize=(7, 6), sharex=True)for axis, (genotype, label) in zip(axes, GENOTYPE_LABELS.items()): values = calls.loc[calls["genotype"] == genotype, "qual"] axis.hist( values, bins=bins, color=GENOTYPE_COLORS[genotype], edgecolor="white", linewidth=0.3, ) # The dashed line is the calling threshold of 30. axis.axvline(30, linestyle="--", color="0.4", linewidth=1) axis.set_title(label, loc="left", fontsize=11) axis.set_ylabel("Records") axis.spines[["top", "right"]].set_visible(False)axes[-1].set_xscale("log")axes[-1].set_xticks( [30, 100, 300, 1000, 3000], ["30", "100", "300", "1,000", "3,000"])axes[-1].set_xlabel("QUAL, log scale")figure.tight_layout()
Path("outputs").mkdir(exist_ok=True)figure.savefig("outputs/variant-calling_qual_python.png", dpi=150)
How to read the output
Section titled “How to read the output”The counts describe an ordinary germline call set for one megabase of one person.
Heterozygous calls outnumber homozygous ones, and the 50 multiallelic records are exactly
the 50 1/2 calls, where each haplotype carries a different ALT allele.
The rsID share of 94.8 percent says that most of these sites are known, not that the calls are right. The HaplotypeCaller arguments state that “dbSNP is not used in any way for the calculations themselves”, so a false call at a known site still gets its rsID.
QUAL tracks depth and genotype more than correctness. Every read at a homozygous site supports the ALT, so the orange panel sits to the right of the blue one without its calls being any truer. GQ asks which genotype, given a variant, and the run confirms that it equals the second lowest PL, capped at 99, in every record. It sits at the cap for 1,724 of 1,807 records, so at this depth only its low end carries information, and the same holds for QUAL.
# The low tail: records with QUAL below 100, records with GQ below 20, and bothbcftools view -H -i 'QUAL < 100' "$HC" | wc -lbcftools view -H -i 'FMT/GQ < 20' "$HC" | wc -lbcftools query -i 'QUAL < 100 || FMT/GQ < 20' \ -f '%POS\t%REF\t%ALT\t%QUAL\t%INFO/QD\t[%GT\t%AD\t%GQ\t%PL]\n' "$HC"32710043652 CT C 72.6 14.52 0/1 2,3 49 80,0,4910118061 TTA T 70.86 31.73 0/1 0,2 2 78,0,210118081 T TATA 151.02 31.55 0/1 0,4 0 158,0,010145655 GA G 544.94 24.77 1/1 2,20 5 556,5,010147102 A C 57.64 1.7 0/1 28,6 65 65,0,91310224292 TGCAG T 55.6 6.18 0/1 7,2 63 63,0,28810224298 C T 52.64 5.26 0/1 8,2 60 60,0,33010224303 C T 52.64 5.26 0/1 8,2 60 60,0,33010224304 C T 52.64 5.26 0/1 8,2 60 60,0,33010308257 C CT 99.6 14.23 0/1 3,4 76 107,0,7610327064 C CTT 56.6 9.43 0/1 4,2 64 64,0,13410333494 T C 80.64 2.44 0/1 28,5 88 88,0,110810333498 T C 77.64 2.28 0/1 29,5 85 85,0,116410333502 A C 77.64 2.28 0/1 29,5 85 85,0,115910333506 T C 48.64 1.47 0/1 29,4 56 56,0,115710381822 C CTT 93.6 11.7 0/1 5,3 99 101,0,15810392438 C CT 78.03 26.01 1/1 0,3 9 73,9,010394171 C T 66.64 2.02 0/1 26,7 74 74,0,84010400813 C CAAA 61.6 8.8 0/1 3,4 43 69,0,4310432789 C CA 58.6 7.33 0/1 4,4 66 66,0,8010445311 CT C 92.6 9.26 0/1 6,4 99 100,0,13910493859 C CTTT 262.61 29.18 0/1 1,8 18 270,0,1810558341 CA C 80.6 4.74 0/1 12,5 88 88,0,38110579666 T C 80.64 2.02 0/1 30,10 88 88,0,115810579669 A C 80.64 2.02 0/1 30,10 88 88,0,115810626190 A AT 50.27 25.13 1/1 0,2 6 62,6,010668092 TAAA T 274.77 34.35 0/1 1,7 4 282,0,410899557 TTTC T 73.6 4.6 0/1 13,3 81 81,0,53110915545 G A 86.64 4.33 0/1 16,4 94 94,0,66010915549 G A 86.64 4.33 0/1 16,4 94 94,0,66010915553 G A 61.64 2.8 0/1 19,3 69 69,0,78910915559 G A 52.64 2.11 0/1 22,3 60 60,0,91510915564 G A 46.64 1.73 0/1 24,3 54 54,0,99410915568 G A 40.64 1.4 0/1 26,3 48 48,0,106610933319 T G 59.64 1.99 0/1 22,8 67 67,0,54210938840 A C 93.64 2.4 0/1 27,12 99 101,0,796Three failure patterns run through that list, and the reference sequence around three of its records shows where they come from.
samtools faidx /opt/reference/chr20.fasta \ chr20:10915540-10915575 chr20:10118055-10118095 chr20:10432780-10432825>chr20:10915540-10915575AAAAAGAAAGAAAGAAAAAGAAAAGAAAGAAAAAAA>chr20:10118055-10118095TATATATTATATATATAATGTGTATATATATATATATTATA>chr20:10432780-10432825ACTCTTTGTCAAAAAAAAAAAAAAAAAAAAAAAAAATCGTGTAGTTThe first is a run of heterozygous SNVs a few bases apart. The six G to A calls from
10,915,545 to 10,915,568 sit in an AAAG repeat, each with 3 or 4 ALT reads against 16
to 26 REF reads and a QD from 1.4 to 4.33. A real heterozygous SNV draws about half the
reads. A cluster at a low allele fraction points to reads placed where they do not belong,
from a similar sequence elsewhere in the genome or from a different repeat length aligned
with mismatches. With chr20 as the whole reference, reads from other chromosomes have
nowhere else to go, and the Benchmarking page checks calls
like these against the truth set.
The second is a genotype built on almost no reads, inside a TA repeat. The deletion at
10,118,061 is called 0/1 from two reads that both support the deletion, with a GQ of 2.
The insertion at 10,118,081 has PL 158,0,0, a tie between 0/1 and 1/1, so its GQ is
0. The site is probably variant, and the genotype is a guess.
The third is a homopolymer. The C to CA insertion at 10,432,789 lengthens a long run of
A bases, with 4 reads for each allele, and every base of such a run is a chance for the
sequencer or the aligner to gain or lose one.
None of these records carries a FILTER value. The Filtering page turns QD, the strand annotations and the rest into filters and counts what each one removes.
Next steps
Section titled “Next steps”The next page, Comparing callers, puts this file next to the DeepVariant, freebayes and bcftools calls on the same reads.
Scientific references
Section titled “Scientific references”Danecek and colleagues, 2021 describe the development and the current features of SAMtools and BCFtools.
Obenchain and colleagues, 2014 describe VariantAnnotation, the Bioconductor package for the exploration and annotation of genetic variants.
Further reading
Section titled “Further reading”The GATK HaplotypeCaller reference describes local assembly and the initial call set. Its output still needs the filtering discussed in the next lesson.
The VCF specification defines QUAL, FILTER, and genotype fields. These definitions separate site-level annotations from per-sample evidence.