d19b85083618569a8b3400a8d17a3d2028ef223d
lrnassar
Tue Sep 29 15:38:31 2026 -0700
The itemRgb doc said a color setting "in the same stanza" loses to an explicit itemRgb on, which is narrower than bedItemRgb() behaves: both settings go through trackDbSetting(), which walks the parent chain, and the two lookups are independent, so a parent's itemRgb on beats a color set on the child itself. Reworded that and the matching colorFields sentence, and added the changes.html row this should have had. Caught by CR of 64adf565f28. refs #36212
diff --git src/hg/htdocs/goldenPath/help/trackDb/trackDbLibrary.shtml src/hg/htdocs/goldenPath/help/trackDb/trackDbLibrary.shtml
index 77fa9a20c91..ddf0a6cc56b 100644
--- src/hg/htdocs/goldenPath/help/trackDb/trackDbLibrary.shtml
+++ src/hg/htdocs/goldenPath/help/trackDb/trackDbLibrary.shtml
@@ -2283,38 +2283,40 @@
at least 9 standard bed fields, this setting can be used to activate
item coloring using the value in the ninth field, itemRgb. The
value of the item field must be an R,G,B triplet. When loaded
into a table, this field appears as an integer with the RGB values
in specific bits of the integer. To observe this field, specify the type as,
type bigBed 9, or, type bigBed 9+, for additional
non-standard columns,
in the trackDb stanza for the bigBed file.
Note that the display of color is affected by the maxItems option.
When the track is zoomed to the point that the number of items to display
exceeds maxItems, the track is forced into dense mode and the items
are drawn from the bigBed summary in the default track color rather than using
the itemRgb column.
Whether the items are drawn from the itemRgb column also depends on
- the color setting:
color setting. Both
+ settings are inherited from a track's parent, and an explicit
+ itemRgb wins wherever it is set:
itemRgb on: items take the colors in the file. A color
- setting in the same stanza still colors the track label, but it does not override
- the items.itemRgb off: items take the color setting, or black if
there is none.color alone: items take the color setting.color with no itemRgb: items take the color
+ setting.Example:
itemRgb on
colorFields default="<label>" <fieldName1>="<label1>" <fieldName2>="<label2>" ...
Enables a Color by: dropdown in the track controls that lets the user switch among multiple pre-computed color schemes without leaving the track display.
@@ -2323,32 +2325,32 @@ extra bigBed field (defined in the track's.as file) that contains a
pre-computed R,G,B color string, the same format as the standard
itemRgb field. The label in double
quotes is shown in the dropdown; if omitted, a label is derived automatically by
stripping a leading colorBy prefix and replacing underscores with spaces.
The special name default (with an optional label) represents the track's
existing itemRgb field (column 9) and is placed first in the dropdown.
When no default= entry is given, an unlabeled "Default" option
is added automatically.
Item coloring must be active for colorFields to work. It is active by
default on bigBed tracks with more than 9 fields. It is suppressed by
- itemRgb off, or by a color setting in a stanza that does not
- also say itemRgb on. The currently
+ itemRgb off, or by a color setting when neither the track nor
+ its parent says itemRgb on. The currently
selected scheme is stored in the cart variable <trackName>.colorField.
When a non-default scheme is active, the track long label gains a
(Coloring by: <label>) suffix.
Example:
colorFields default="Kozak strength" colorByEvidence="Evidence type" colorByHlaClass="HLA class"
This creates a three-option dropdown. colorByEvidence and
colorByHlaClass must be extra fields in the bigBed whose values are
R,G,B strings.
maxItems <integer>