eebe031af9dfcecc8f5d0c1a5cd6a13b4d3e8865 mspeir Wed Sep 9 14:43:26 2026 -0700 VCF help: explain which display modes draw the haplotype view, and add the settings that were missing, refs #38010 Neither VCF help page said that the haplotype sorting display depends on the track's display mode. vcfTrack.c reaches vcfHapClusterOverloadMethods only when the visibility is pack or squish and the file has genotypes for more than one sample; every other case falls through to vcfFileToPgSnp. So full draws one row per variant, dense collapses them onto a single row, and in both of those the "Enable Haplotype sorting display" checkbox and everything conditional on it do nothing. Multi-region view and the density graph option disable it as well. Say so on hgVcfTrackHelp.html, above the settings it governs, and on vcf.html next to the visibility parameter. vcf.html also listed only hapCluster{Enabled,ColorBy,TreeAngle,Height}, applyMinQual, minQual and minFreq. Add hapClusterMethod, sampleColorFile, minAc and the four vcfDo* switches that hide filter controls, in a block of their own since they are mostly used by hubs. sampleMetadataFile and showHardyWeinberg are defined in vcfUi.h but nothing in the tree reads them, so they are left out. Checked all four modes on the HGDP phased variants track, chr21:33,000,000- 33,010,000: dense 566 px, squish 617, pack 681, full 9574. Co-Authored-By: Claude Opus 5 (1M context) diff --git src/hg/htdocs/goldenPath/help/vcf.html src/hg/htdocs/goldenPath/help/vcf.html index 92d8ff19448..cac60b53e20 100755 --- src/hg/htdocs/goldenPath/help/vcf.html +++ src/hg/htdocs/goldenPath/help/vcf.html @@ -169,38 +169,57 @@ Click here for a text version that you can paste without editing.

The track type and bigDataUrl are REQUIRED:

type=vcfTabix bigDataUrl=http://myorg.edu/mylab/my.vcf.gz 

The remaining settings are OPTIONAL. Some are specific to VCF:

hapClusterEnabled   true|false              # if file has phased genotypes, sort by local similarity
 hapClusterColorBy   altOnly|refAlt|base     # coloring scheme, default altOnly, conditional on hapClusterEnabled
 hapClusterTreeAngle triangle|rectangle      # draw leaves as < or [, default <, conditional on hapClusterEnabled
 hapClusterHeight    N                       # height of track in pixels, default 128, conditional on hapClusterEnabled
 applyMinQual        true|false              # if true, don't display items with QUAL < minQual; default false
 minQual             Q                       # minimum value of Q column to display item, conditional on applyMinQual
 minFreq             F                       # minimum minor allele frequency to display item; default 0.0 

+These VCF settings are also recognized. They are used mainly in track hubs and are rarely +needed in a custom track line:

+
hapClusterMethod centerWeighted|fileOrder|treeFile url # haplotype sort order, default centerWeighted
+sampleColorFile  url                                   # sample-to-color table, used with hapClusterMethod treeFile
+minAc            N                                     # minimum alternate allele count to display item; default 0
+vcfDoQual        true|false                            # show the QUAL controls on the configuration page; default true
+vcfDoFilter      true|false                            # show the FILTER controls; default true
+vcfDoMaf         true|false                            # show the allele frequency control; default true
+vcfDoMinAc       true|false                            # show the allele count control; default true
+

Other optional settings are not specific to VCF, but relevant:

name            track label                 # default is "User Track"
 description     center label                # default is "User Supplied Track"
 visibility      squish|pack|full|dense|hide # default is hide (will also take numeric values 4|3|2|1|0)
 priority        N                           # default is 100
 db              genome database             # e.g. hg19 for Human Feb. 2009 (GRCh37)
 maxWindowToDraw N                           # don't display track when viewing more than N bases
 chromosomes     chr1,chr2,...               # track contains data only on listed reference assembly sequences 
+

+The visibility setting controls what the track draws, not just how tightly it is +packed. In pack or squish mode, a VCF that has genotype columns +for two or more samples is drawn as the haplotype sorting display, in which each sample's +haplotypes run horizontally across the image. In full mode the track draws one +row per variant, and in dense mode it collapses every variant onto a single row. +The hapCluster settings above are ignored in those two modes, and also whenever +hapClusterEnabled is false or the file has no genotypes.

+

The VCF track configuration help page describes the VCF track configuration page options.

Phased Trio format

The vcfPhasedTrio track type is available for users whose VCF contains genotype data from one to three individuals. The underlying VCF follows the standard VCF format as described above, with the added caveat that there must be GENOTYPE columns for each of the individuals present. An example of the trio display is shown below for the 1000 Genomes Trio track on Human/GRCh38: