6d02024d6f5b80437784b274ff2ccf6940dde976
mspeir
Wed Sep 9 15:08:26 2026 -0700
VCF help: document geneTrack, the function coloring scheme, and vcfPhasedColorBy, refs #38010
The rest of the settings vcfUi.c reads from trackDb but neither help page
mentioned.
geneTrack (vcfUi.c:269 and :681) is the gate for the functional-effect coloring
in both the haplotype display and the trio display: the radio button is only
printed when the setting is non-empty. Nothing on either page said so, so the
scheme was undiscoverable and its absence looked like a bug.
hapClusterColorBy therefore has four values, not the three both pages listed --
hgVcfTrackHelp.html went as far as saying "There are three ways that reference
and alternate alleles can be colored" above three bullets. Add the fourth, in
the order vcfCfgHapClusterColor prints the buttons, and add function to the
value lists in vcf.html.
vcfPhasedColorBy (mendelDiff|deNovo|function|noColor) was documented nowhere at
all, not even in trackDbLibrary.shtml, though vcf.html already described what it
does in the alt text of the trio screenshot. Add it to the trio settings.
Both settings tables needed a wider value column to fit, so those rows are
repadded; no wording in them changed.
Co-Authored-By: Claude Opus 5 (1M context)
All options are placed in a single line separated by spaces (lines are broken only for readability
here):
Note if you copy/paste the above example, you must remove the line breaks.
Click here for a text version that you can paste
without editing.
The track type and bigDataUrl are REQUIRED:
The remaining settings are OPTIONAL. Some are specific to VCF:
These VCF settings are also recognized. They are used mainly in track hubs and are rarely
needed in a custom track line:
Other optional settings are not specific to VCF, but relevant:track type=vcfTabix name="My VCF" bigDataUrl=http://myorg.edu/mylab/my.vcf.gz bigDataIndex=http://myorg.edu/someOtherDirectory/myvcf.gz.tbiParameters for VCF custom track definition lines
track type=vcfTabix bigDataUrl=http://...
hapClusterEnabled=true|false
- hapClusterColorBy=altOnly|refAlt|base
+ hapClusterColorBy=altOnly|function|refAlt|base
hapClusterTreeAngle=triangle|rectangle
hapClusterHeight=N
applyMinQual=true|false minQual=Q
minFreq=F
name=track_label
description=center_label
visibility=display_mode
priority=priority
db=db maxWindowToDraw=N
chromosomes=chr1,chr2,... type=vcfTabix bigDataUrl=http://myorg.edu/mylab/my.vcf.gz hapClusterEnabled true|false # if file has phased genotypes, sort by local similarity
-hapClusterColorBy altOnly|refAlt|base # coloring scheme, default altOnly, conditional on hapClusterEnabled
+hapClusterColorBy altOnly|function|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
+geneTrack track name # gene track used by the function coloring scheme; without it that scheme is not offered
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 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
Follow the steps for a normal VCF file, including moving the file to a web accessible location and generating a tabix index file, then use the following required vcfPhasedTrio trackDb settings to view the trio display:
type vcfPhasedTrio # The track type is required and must be "vcfPhasedTrio"
bigDataUrl http://url.to.vcfFile # The bigDataUrl is required
vcfChildSample GT ID|alias # the Genotype column ID of the "child" sample, with an optional "|" followed by a human readable alias for the ID
-There are also two optional settings for vcfPhasedTrio tracks:
+There are also three optional settings for vcfPhasedTrio tracks:
vcfParentSamples GT ID1|alias1,GT ID2|alias2 # comma separated (no spaces) list of the "parent" samples, with optional aliases
vcfUseAltSampleNames GT ID # Use the aliases in the display by default instead of the Genotype column ID
+vcfPhasedColorBy mendelDiff|deNovo|function|noColor # allele coloring scheme, default noColor; function also requires geneTrack
Other optional settings are not specific to VCF, but relevant:
maxWindowToDraw N # don't display track when viewing more than N bases
chromosomes chr1,chr2,... # track contains data only on listed reference assembly sequences
In this example, you will create a custom track for an indexed VCF file that is already on a public server — variant calls generated by the 1000 Genomes Project. The line breaks inserted here for readability must be removed before submitting the track line:
browser position chr21:33,034,804-33,037,719
track type=vcfTabix name="VCF Example One" description="VCF Ex. 1: 1000 Genomes phase 1 interim SNVs"
chromosomes=chr21 maxWindowToDraw=200000