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) <noreply@anthropic.com>

diff --git src/hg/htdocs/goldenPath/help/vcf.html src/hg/htdocs/goldenPath/help/vcf.html
index cac60b53e20..d64733d79ff 100755
--- src/hg/htdocs/goldenPath/help/vcf.html
+++ src/hg/htdocs/goldenPath/help/vcf.html
@@ -141,54 +141,55 @@
   <em>bigDataIndex</em> attribute in the track line to point to the index file.
   <pre><code>track type=vcfTabix name="My VCF" bigDataUrl=<em>http://myorg.edu/mylab/my.vcf.gz</em> bigDataIndex=<em>http://myorg.edu/someOtherDirectory/myvcf.gz.tbi</em></code></pre>
   </li>
   <li>
   Paste the custom track line into the text box in the <a href="../../cgi-bin/hgCustom" 
   target="_blank">custom track management page</a>, click &quot;submit&quot; and view in the Genome 
   Browser.</li>
 </ol>
 
 <h2>Parameters for VCF custom track definition lines</h2>
 <p>
 All options are placed in a single line separated by spaces (lines are broken only for readability 
 here):</p>
 <pre><code><strong>track type=vcfTabix bigDataUrl=</strong><em>http://...</em>
     <strong>hapClusterEnabled=</strong><em>true|false</em>
-    <strong>hapClusterColorBy=</strong><em>altOnly|refAlt|base</em>
+    <strong>hapClusterColorBy=</strong><em>altOnly|function|refAlt|base</em>
     <strong>hapClusterTreeAngle=</strong><em>triangle|rectangle</em>
     <strong>hapClusterHeight=</strong><em>N</em>
     <strong>applyMinQual=</strong><em>true|false</em> <strong>minQual=</strong><em>Q</em>
     <strong>minFreq=</strong><em>F</em>
     <strong>name=</strong><em>track_label</em>
     <strong>description=</strong><em>center_label</em> 
     <strong>visibility=</strong><em>display_mode</em>
     <strong>priority=</strong><em>priority</em>
     <strong>db=</strong><em>db</em> <strong>maxWindowToDraw=</strong><em>N</em> 
     <strong>chromosomes=</strong><em>chr1,chr2,...</em> </code></pre>
 <p>
 Note if you copy/paste the above example, you must remove the line breaks.
 Click <a href="examples/vcfExample.txt">here</a> for a text version that you can paste 
 without editing.</p>
 <p>
 The track type and bigDataUrl are REQUIRED:</p>
 <pre><code><strong>type=vcfTabix bigDataUrl=</strong><em>http://myorg.edu/mylab/my.vcf.gz</em></strong> </code></pre>
 <p>
 The remaining settings are OPTIONAL.  Some are specific to VCF:</p>
 <pre><code><strong>hapClusterEnabled   </strong><em>true|false                  </em> # if file has phased genotypes, sort by local similarity
-<strong>hapClusterColorBy   </strong><em>altOnly|refAlt|base    </em> # coloring scheme, default altOnly, conditional on hapClusterEnabled
+<strong>hapClusterColorBy   </strong><em>altOnly|function|refAlt|base</em> # coloring scheme, default altOnly, conditional on hapClusterEnabled
 <strong>hapClusterTreeAngle </strong><em>triangle|rectangle          </em> # draw leaves as < or [, default <, conditional on hapClusterEnabled
 <strong>hapClusterHeight    </strong><em>N                           </em> # height of track in pixels, default 128, conditional on hapClusterEnabled
+<strong>geneTrack           </strong><em>track name                  </em> # gene track used by the function coloring scheme; without it that scheme is not offered
 <strong>applyMinQual        </strong><em>true|false                  </em> # if true, don't display items with QUAL < minQual; default false
 <strong>minQual             </strong><em>Q                           </em> # minimum value of Q column to display item, conditional on applyMinQual
 <strong>minFreq             </strong><em>F                           </em> # minimum minor allele frequency to display item; default 0.0 </code></pre>
 <p>
 These VCF settings are also recognized. They are used mainly in track hubs and are rarely
 needed in a custom track line:</p>
 <pre><code><strong>hapClusterMethod </strong><em>centerWeighted|fileOrder|treeFile url</em> # haplotype sort order, default centerWeighted
 <strong>sampleColorFile  </strong><em>url                                  </em> # sample-to-color table, used with hapClusterMethod treeFile
 <strong>minAc            </strong><em>N                                    </em> # minimum alternate allele count to display item; default 0
 <strong>vcfDoQual        </strong><em>true|false                           </em> # show the QUAL controls on the configuration page; default true
 <strong>vcfDoFilter      </strong><em>true|false                           </em> # show the FILTER controls; default true
 <strong>vcfDoMaf         </strong><em>true|false                           </em> # show the allele frequency control; default true
 <strong>vcfDoMinAc       </strong><em>true|false                           </em> # show the allele count control; default true</code></pre>
 <p>
 Other optional settings are not specific to VCF, but relevant:</p>
@@ -235,33 +236,34 @@
 phasing information of the VCF file. Each haplotype is displayed on two separate, horizontal black
 lines across the browser window. Each variant is drawn as a vertical dash. Homozygous variants will
 show two identical dashes on both haplotype lines. Phased heterozygous variants are placed on one
 of the haplotype lanes and unphased heterozygous variants are displayed in the area between the
 two haplotype lines.
 </p>
 
 <p>
 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:
 <pre><code><strong>type                   </strong><em>vcfPhasedTrio                </em> # The track type is required and must be &quot;vcfPhasedTrio&quot;
 <strong>bigDataUrl             </strong><em>http://url.to.vcfFile        </em> # The bigDataUrl is required
 <strong>vcfChildSample         </strong><em>GT ID|alias                  </em> # the Genotype column ID of the "child" sample, with an optional &quot;|&quot; followed by a human readable alias for the ID
 </code></pre>
-<p>There are also two optional settings for vcfPhasedTrio tracks:</p>
+<p>There are also three optional settings for vcfPhasedTrio tracks:</p>
 <pre><code><strong>vcfParentSamples       </strong><em>GT ID1|alias1,GT ID2|alias2       </em> # comma separated (no spaces) list of the &quot;parent&quot; samples, with optional aliases
 <strong>vcfUseAltSampleNames   </strong><em>GT ID                             </em> # Use the aliases in the display by default instead of the Genotype column ID
+<strong>vcfPhasedColorBy       </strong><em>mendelDiff|deNovo|function|noColor</em> # allele coloring scheme, default noColor; function also requires geneTrack
 </code></pre>
 <p>Other optional settings are not specific to VCF, but relevant:</p>
 <pre><code><strong>maxWindowToDraw        </strong><em>N                            </em> # don't display track when viewing more than N bases
 <strong>chromosomes            </strong><em>chr1,chr2,...                </em> # track contains data only on listed reference assembly sequences </code></pre>
 
 <h2>Examples</h2>
 <h3>Example #1</h3>
 <p>
 In this example, you will create a custom track for an indexed VCF file that is already on a public 
 server &mdash; variant calls generated by the <a href="http://1000genomes.org/" 
 target="_blank">1000 Genomes Project</a>. The line breaks inserted here for readability must be 
 removed before submitting the track line:</p>
 <pre><code>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