38fc33c4bbf6c8b960af709cb17a2467d6b6cac2 lrnassar Tue Sep 29 15:40:59 2026 -0700 The description page variables section claimed shell and awk examples were safe from substitution, which is wrong twice over: parseVarNameMaybe accepts a bare $db as readily as ${db}, so an example using $db or $track as its own shell variable gets the value put in, and $$ still collapses to a single $. Say that instead, and document $$ as the way to write a literal dollar. The section also renders on trackDbDoc.html, which is the native trackDb doc, where "other trackDb settings are not available" is false, so it is now scoped to a hub's description page. Caught in code review of 8d05f42. refs #38283 diff --git src/hg/htdocs/goldenPath/help/trackDb/trackDbLibrary.shtml src/hg/htdocs/goldenPath/help/trackDb/trackDbLibrary.shtml index ddf0a6cc56b..4b6a72bb9f8 100644 --- src/hg/htdocs/goldenPath/help/trackDb/trackDbLibrary.shtml +++ src/hg/htdocs/goldenPath/help/trackDb/trackDbLibrary.shtml @@ -405,64 +405,69 @@

If the track has colors, or unusual display properties, explain them in this section, or how to configure special settings.

Methods

This section can explain data-handling algorithms, or the significance of scores if generated in a special fashion.

Credits

This section helps people find the contacts for questions about the data. Please include an email or laboratory web page.

References

Relevant publications regarding the data.

Example:

    html docs/myFirstTrack.html
Or with full path:
    html https://path/to/location/docs/explainMyData.html
-

Variables in the description page

-

The description page may use the variables below, written in the form +

Variables in a hub's description page

+

A hub's description page may use the variables below, written in the form ${name}. They are replaced when the page is shown, both on the track settings page and on the item details page.

${db}the assembly the track is being viewed on, for example hg38
${organism}the organism in lower case, for example human
${Organism}the organism with an initial capital, for example Human
${ORGANISM}the organism in upper case, for example HUMAN
${date}the release description of the assembly, for example Dec. 2013 (GRCh38/hg38)
${track}the name of this track
${parentTrack}the name of the container this track sits in, either a compositeTrack or a superTrack. A view is skipped, since a view has no description page of its own. For a track that is not inside a container, this is the same as ${track}.
${downloadsServer}hgdownload.soe.ucsc.edu

${track} and ${parentTrack} come out with the prefix the Genome Browser gives a hub track's name, so they can be used to build a link back into the Browser. This is how the page of a track inside a container links to the container's own page:

<a href="hgTrackUi?db=${db}&amp;g=${parentTrack}">Back to the container</a>

-

Nothing else is replaced. A dollar sign followed by anything other than the names - listed above is left alone, so shell, awk and JavaScript examples elsewhere on the page - are safe. Other trackDb settings are not available as variables, and neither is the - session id.

+

These are the only names a hub's description page can use. Other trackDb settings + are not available as variables, and neither is the session id. UCSC's own description + pages are substituted when trackDb is loaded and follow different rules.

+

Take care with a dollar sign that is not meant as a variable. The bare form + $db is recognised as well as ${db}, so a shell or awk example + that happens to use $db or $track as its own variable will come + out with the value substituted in. Write $$ for a literal dollar sign: + $$db is shown as $db, and $$ on its own is shown + as $.

Common, though less frequently used settings

The following settings are available for many or all track types but are less frequently used. Most are optional, but some may be required for specific track types or in specific situations.

Inside hint: The ra file format supports '\' continuation characters. If the setting is long or complex, break it into several lines using terminating '\' characters to make it more readable.