791097ea7589f6fadcf825c5c3a8934054917a28 angie Thu Jul 9 14:38:12 2020 -0700 VCF haplotype display: trackDb setting geneTrack adds option to color by function (red for non-synon, green for synon, blue for UTR/NC). refs #25870 diff --git src/hg/lib/vcfUi.c src/hg/lib/vcfUi.c index 8702fd6..52a7e2f 100644 --- src/hg/lib/vcfUi.c +++ src/hg/lib/vcfUi.c @@ -249,30 +249,41 @@ safef(cartVar, sizeof(cartVar), "%s." VCF_HAP_ENABLED_VAR, name); cgiMakeCheckBox(cartVar, hapClustEnabled); printf("Enable %s sorting display
\n", vcfHaplotypeOrSample(cart)); } static void vcfCfgHapClusterColor(struct cart *cart, struct trackDb *tdb, char *name, boolean parentLevel) /* Let the user choose how to color the sorted haplotypes. */ { printf("Allele coloring scheme:
\n"); char *colorBy = cartOrTdbString(cart, tdb, VCF_HAP_COLORBY_VAR, VCF_DEFAULT_HAP_COLORBY); char varName[1024]; safef(varName, sizeof(varName), "%s." VCF_HAP_COLORBY_VAR, name); cgiMakeRadioButton(varName, VCF_HAP_COLORBY_ALTONLY, sameString(colorBy, VCF_HAP_COLORBY_ALTONLY)); printf("reference alleles invisible, alternate alleles in black
\n"); +char *geneTrack = cartOrTdbString(cart, tdb, "geneTrack", NULL); +if (isNotEmpty(geneTrack)) + { + cgiMakeRadioButton(varName, VCF_HAP_COLORBY_FUNCTION, + sameString(colorBy, VCF_HAP_COLORBY_FUNCTION)); + printf("reference alleles invisible, alternate alleles in " + "red for non-synonymous, " + "green for synonymous, " + "blue for UTR/noncoding, " + "black otherwise
\n"); + } cgiMakeRadioButton(varName, VCF_HAP_COLORBY_REFALT, sameString(colorBy, VCF_HAP_COLORBY_REFALT)); printf("reference alleles in blue, alternate alleles in red
\n"); cgiMakeRadioButton(varName, VCF_HAP_COLORBY_BASE, sameString(colorBy, VCF_HAP_COLORBY_BASE)); printf("first base of allele (A = red, C = blue, G = green, T = magenta)
\n"); } static void vcfCfgHapClusterTreeAngle(struct cart *cart, struct trackDb *tdb, char *name, boolean parentLevel) /* Let the user choose branch shape. */ { // This option applies only to center-weighted clustering; don't show option when some other // method is selected. char *hapMethod = cartOrTdbString(cart, tdb, VCF_HAP_METHOD_VAR, VCF_DEFAULT_HAP_METHOD); printf("
\n", differentString(hapMethod, VCF_HAP_METHOD_CENTER_WEIGHTED) ? " style='display: none;'" : "");